Check out Atomic Chess, our featured variant for November, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Comments/Ratings for a Single Item

Earlier Reverse Order Later
Do we need raw text comments?[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Sat, Apr 7, 2012 01:05 AM UTC:
I could add the option of displaying a comment as raw text, but is it a
good idea? On the plus side, it would allow the display of raw HTML code.
But with PRE tags, it wouldn't look right, and with PRE tags, we could end
up with long lines that mess up the comment listing. Given that this site
is not about discussing HTML, is there any use for displaying raw HTML code
inside of comments?

🕸Fergus Duniho wrote on Sat, Apr 7, 2012 01:31 AM UTC:
Let's try some double html entities

The P tag has the & in the entities replaced by &


🕸Fergus Duniho wrote on Sat, Apr 7, 2012 01:36 AM UTC:
So there is a way of displaying HTML code short of allowing raw text. By
replacing the & in an entity with the entity for &, HTML entities can be included in
the display, and these can be used to display HTML code. Normally, a
comment will converted into characters, then converted back into HTML
entities before being stored in the database. By storing characters used by
HTML as HTML entities, "double" quotes and 'single' quotes can be
included in the comment without either messing up MySQL query strings.

Note: The & entity is still not easily displayed, and if you edit a comment, the HTML entities may convert into characters.

(zzo38) A. Black wrote on Sat, Apr 7, 2012 01:59 AM UTC:
To prevent HTML entities to convert to characters (and also to prevent
TEXTAREA terminating tags (such as in a Game Courier form) from messing up
the editor), use htmlspecialchars on the data when filling up the text area
(everywhere); I believe this will work.

🕸Fergus Duniho wrote on Sat, Apr 7, 2012 02:12 AM UTC:

🕸Fergus Duniho wrote on Sat, Apr 7, 2012 02:14 AM UTC:

HTML might be included with a TEXTAREA tag

Some boldfaced text


🕸Fergus Duniho wrote on Sat, Apr 7, 2012 01:53 PM UTC:

7 comments displayed

Earlier Reverse Order Later

Permalink to the exact comments currently displayed.