There is a small problem with Xway.
The conversion of HTML characters is great but not when it comes to php in the title field for dynamic titles.
You should add a exception rule that don’t change the “<” if followed by “?” and not change a “´>” when it follows a “?”.
Of course it is no problem to edit this later on in an editor, but it isn’t so nice.
Thank you for implementing this so fast.
To avoid confusing it may be worth noting that there should be no spaces between “<?” and “PHP”. Otherwise it won’t work.
Xway looks for the PHP delimiters (<? and ?>) and doesn’t escape any text that occurs between them - but it’s (currently) up to the user to ensure that the content between these delimiters is valid PHP.
Also: as I understand it (according to the PHP website), there are various options for open tags, which don’t necessarily require php to follow <?, e.g. “short echo tag” and “short open tag”. Short open tags (as opposed to short echo tags) appear to be discouraged, but I’m not sure that Xway should prevent people from using them.
Perhaps we could remove any space that might occur between <? and php, but Xway doesn’t currently do that.
Everything is ok and works fine but if someone types in <? php $myvariable ?> instead of <?php $myvariable ?> it doesn’t work in Xway. I think it is enough to point to this circumstance in the User Guide.
I think (but don’t quote me, it’s been some time since I used PHP in anger) that if you type <? php and you have short open tags on, that’s a syntax error. If you type <?php then that will work, with either short or long open tags.
I have never tried doing <? php when you only have long open tags (the default) on, but I think that is also a syntax error, because you just have the bare word php there, and nothing to reference it to, so it basically consists of a call to a nonexistent function followed by no ; to end the line.
The whole thing together:
<?php
… is one token to mark the beginning of the code island, as far as I know.
Yes Walter, you are absolutely right.
I haven’t tried it and just thought what if someone added a space?
Now I tried and PHP ignores this line.
So the PHP title field in Xway works perfectly as is.