|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #9549 Add Note problem
Submitted: 2001-03-04 13:26 UTC Modified: 2001-07-04 19:28 UTC
From: wls at wwco dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 4.0.4pl1 OS: n/a
Private report: No CVE-ID: None
 [2001-03-04 13:26 UTC] wls at wwco dot com
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!


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-04 19:28 UTC]
This is not a PHP-bug, but a website bug. Send to if still valid.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Sep 27 13:03:36 2021 UTC