-
2005-09-15
jamesvl
Pages may no longer validate as XHTML compliant when using PHP to generate output.
The parser/lexer treats *any* text in a page as "text to wrap in <p> tags"... even when that "text" includes <php> tags that will generate its own output.
Thus all the output of the PHP code is wrapped in <p> tags... that's fine if I only output text from my PHP. It's invalid XHTML if I generate other block level elements (like a <form>) from my code. (Same things happens with <html> tags... the parser will wrap it in <p> tags.)
Suggestion: the parser should check if the text it is about to place in <p> tags begins with <php> or <html>. If it is, can it assume that the php or or html is responsible for its own formatting?
-
2006-10-08
gb
This is an interesting issue :-) We should try not to break XHTML conformance...
-
2006-10-15
gb
Could you please make a test with the available RC2 version and report back if the problem still exists? Thanks
-
2006-11-05
ChrisS
It'll still exist, although I doubt is a bug. At present both <php> and <html> are considered "normal" (inline) syntax modes. The bug reporter "desires" them to be "block" syntax modes. I don't think there is a right answer. Using "normal" is probably more flexible as you can handcraft correcting html tags inside your own code. If they were "block" would wouldn't be able to place them inside much of DW syntax.
I guess an ideal solution is to have two versions of each one for block and one for inline mode. Rather than adding complexity to DW syntax it is probably best handled by a plugin.
(For security, I think its probably not a bad idea to remove these two tags from DW standard syntax and supply an optional plugin to handle them both)
-
2006-11-05
gb
+1 for moving that to a plugin bundled with DokuWiki
-
2007-05-04
ach
What about having <html>/<php> for inline and <HTML>/<PHP> (capital letters) for block mode!?
I don't care if it will be in core DokuWiki or moved to a plugin. But it should definitely be changed to handle both modes.
-
2007-06-01
ach
For your information:
I changed this as suggested before. The fix will be added to DokuWiki as soon as the next stable release has been released (i.e. shortly *after* that).
-
2007-06-29
ach
fixed in devel
-
Related tasks: