2 posts tagged with characterentities.
Displaying 1 through 2 of 2. Subscribe:

Preview breaks html character entities.

HTML entities, like Π or Σ get converted in the input area to the actual displayed characters after a preview.

So when the comment is posted, the displayed characters -- not the entities -- are actually submitted, and the submitted displayed characters are then converted to question marks in the posted comment.

The result is that a preview that looked fine turns into a comment that doesn't.

Also: using the
 tag (say to preserve original whitespace) results in double-spaced lines, taking up too much vertical space. Using the  tag prevents this, but whitespace is not preserved. Adding   appears to be a (n ugly and hard to edit) work-around, but while leading non-breaking spaces within  tags are retained in previews, they are stripped in the posted comment.

As a number of askMefi's ask for program code, and as even some FPPs may contain code fragments, this makes the code unreadable or even syntactically incorrect in languages than foolishly assign meaning to whitespace.

And it's a pure pain to spend the time to carefully add the whitespace and to Google the correct HTML entities for a post, only to see them stripped out.

(Browser: Firefox 1.0.3)

posted by orthogonality on Apr 27, 2005 - 70 comments

HTML tag preview problem

In asking my HTML question, I was attempting to post the representation of an HR tag inside angle brackets using character entity references, and somehow I managed to post a real-live horizontal rule instead. But it looked fine on Preview. Brackets and ampersands and semicolons, oh my! (testing inside)
posted by brownpau on Apr 5, 2004 - 10 comments

Page: 1