Open GoogleCodeExporter opened 9 years ago
Closing a tag without trailing spaces is also okay in XHTML 1.0 Strict:
<meta http-equiv="content-language" content="en-us"/>
Original comment by j...@beardedbaby.net
on 4 Aug 2009 at 4:39
Original comment by r.wetzlmayr
on 4 Aug 2009 at 7:40
fwiw
The trailing space is part of the xhtml 1.0 standard's html compatibility
guidelines
See Section C2 @ http://www.w3.org/TR/xhtml1/#guidelines
Original comment by tecumseh...@gmail.com
on 6 Aug 2009 at 12:35
> The trailing space is part of the xhtml 1.0 standard's html compatibility
guidelines
Sure, but txp:tags aren't parsed by browsers that evaluate HTML compatibility--
they're parsed by Textpattern.
Old-school HTML didn't recognize self-closing elements, but Textpattern does.
Thanks for the link, it's good to know.
Original comment by j...@beardedbaby.net
on 6 Aug 2009 at 5:09
John,
It seems that altering line 200 of publish/comment.php to read:
$Form = preg_replace('#\<txp\:'.$a.'\s?\/\>#', $b, $Form);
fixes it. I've no idea if this has a significant performance penalty -- it
probably
slows things down a tad -- so there might be a better way.
Original comment by stefdawson
on 9 Aug 2009 at 11:17
I guess it couldn't be any slower than this, @line 1008 of publish.php:
$f = '@(</?txp:\w+(?:\s+\w+\s*=\s*(?:"(?:[^"]|"")*"|\'(?:[^\']|\'\')*\'|[^\s\'"/>]+))*\s*/?'.chr(62).')@s';
Original comment by j...@beardedbaby.net
on 9 Aug 2009 at 9:13
A cleaner solution would be to make them real tags in taghandlers.php and rely
on the
tag parser instead of using a simple search and replace which sometimes
replaces when
it should not (in non-parsed attribute values). $Form is parsed anyway at line
203.
Performance penalty will be negligible.
There's no direct relation between the length of a regular expression and its
speed ;)
Keep in mind that regular expressions have to be compiled (which takes time,
perhaps
more than actually executing it). The search/replace method requires 7 different
regular expressions that are all used only once, while parse() uses only 2
regexes
repeatedly (regex compilation is cached by PHP).
Original comment by r...@vanmelick.com
on 8 Sep 2009 at 9:57
Original issue reported on code.google.com by
j...@beardedbaby.net
on 4 Aug 2009 at 3:32