Johannes Schlueter wrote:
Hi Sara,
On Sunday 28 August 2005 00:02, Sara Golemon wrote:
+<INITIAL>"<?xml"([ \t]|{NEWLINE}) {
And what's with <?xml-stylesheet ?> or any other processing instruction? Even
so others than xml are rarely used it would imho be a great wtf factor if
<?xml is somehow special.
At a sidenote: If you output xml you anyways neet to set the right
content-type header, so either set default_mimetype to text/xml (or similar)
and turn of short_open_tags in the php.ini or start the file with a header()
call followed by an echo of the xml-pi.
If you replace the te following lines:
<INITIAL>"<?"|"<script"{WHITESPACE}+"language"{WHITESPACE}*"="{WHITESPACE}*("php"|"\"php\""|"\'php\'"){WHITESPACE}*">"
{
HANDLE_NEWLINES(yytext, yyleng);
if (CG(short_tags) || yyleng>2) { /* yyleng>2 means it's not <? but
<script> */
with:
<INITIAL>"<?
"|"<script"{WHITESPACE}+"language"{WHITESPACE}*"="{WHITESPACE}*("php"|"\"php\""|"\'php\'"){WHITESPACE}*">"
{
HANDLE_NEWLINES(yytext, yyleng);
if (CG(short_tags) || yyleng>3) { /* yyleng>3 means it's not <? but
<script> */
(notice the space behind '?' and the length check from 2 to 3) Wouldn't
that fix the whole problem without creating a special case for <?xml ?
David
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php