You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!DOCTYPE html>
<html>
<body>
<?php
$x = 1;
while($x <= 5) {
echo "The number is: $x <br>";
$x++;
}
?>
</body>
</html>
The framework interprets this as an HTML file instead of PHP. It you remove the doctype, it interprets it as PHP as expected. Furthermore, the opening and closing and tags are parsed as script instead of markup.
The text was updated successfully, but these errors were encountered:
I am not properly supporting PHP at this time, so I am marking this as an enhancement. If full support were present then this would be an HTML document containing a PHP tag, and the PHP tag portion would be parsed separately from the HTML as PHP instead of JavaScript.
stevenzeck
changed the title
PHP files with doctype are interpreted as HTML
Frontend script files with doctype are interpreted as HTML
Jul 17, 2018
I am not properly supporting PHP at this time, so I am marking this as an enhancement
Fair enough. Which languages are supported? It looks like any frontend non-JS scripting language (JSP, PHP, etc) has this issue. This piece of JSP does the same thing:
I am really faking it a lot with a generic script parser. In most cases this isn't an issue, but I need to perform an audit and write a bunch more test cases. This will take time.
Take the following PHP code sample:
The framework interprets this as an HTML file instead of PHP. It you remove the doctype, it interprets it as PHP as expected. Furthermore, the opening and closing and tags are parsed as script instead of markup.
The text was updated successfully, but these errors were encountered: