PHP 4.0 Bug #9549: Add Note problem

From: Date: Sun, 04 Mar 2001 18:26:02 +0000
Subject: PHP 4.0 Bug #9549: Add Note problem
Groups: php.dev 
Request: Send a blank email to php-dev+get-47913@lists.php.net to get a copy of this message
From: wls@wwco.com Operating system: n/a PHP version: 4.0.4pl1 PHP Bug Type: Documentation problem Bug description: Add Note problem In reference to your Add Note code on the annotatated PHP pages: The current set of note restrictions is actually too limiting and a little more effort need to be focused on what's allowable in a user submitted note. A) I had a very small snipped of PHP code I was trying to include, however preceeding spaces of the indentation were trimmed out, and thus the context was completely lost. My code sample suffered when <PRE>...</PRE> would have resolved it. B) A line in my code read as echo "$value<P>\n"; however this caused the line to break. Allowing <P> or <BR> at the very end of a line would be appropiate to do the logical break. C) I tried entering in "$value&lt;P&gt;\n" instead, only the ampersands were literally translated. Thus there was no way to express the actual literal that was needed. The solution seems to lie in more rigourous parsing -or- creating a special stripped down meta-markup. In all cases, a "I'm including a code snippet, please express the content literally, without translation, and preserving spaces" would solve the problem. A possible solution, instead of all HTML tags, allow just <CODE> ... </CODE>. The defined behavior is that all characters, including spaces and line brakes and angle brackets and ampersands are included as-is. An open code must be followed by a close code, and they can not be nested. If the note doesn't conform to that, do not allow it to be submitted. ...hope this helps! -- Edit Bug report at: http://bugs.php.net/?id=9549&edit=1

« previous php.dev (#47913) next »