Closed
Bug 226945
Opened 21 years ago
Closed 20 years ago
textarea does not print out non-breaking space ("nbsp;) entities
Categories
(Core :: DOM: HTML Parser, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: zcrar70, Unassigned)
Details
Attachments
(1 file)
194 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 Firebird/0.7 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 Firebird/0.7 non-breaking spaces ("nbsp;) coded inside textarea tags do not appear in their full entity form in the browser, but just as normal whitespaces... Reproducible: Always Steps to Reproduce: 1. 2. 3. Actual Results: displayed whitespaces Expected Results: display the fill "nbsp; entity within the textarea
this is inconvenient because when a form containing such a textarea is submitted, the html entities are ignored and converted to whitespaces, which is in most cases not the desired behaviour - especially when it comes to DB data etc...
Comment 3•21 years ago
|
||
This is INVALID. If you want to display " " you should encode it as " ", it will show up then.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
Consider the following use case: * user edits HTML content via a textarea, for example for blogging. He wants precise spacing for some of the text he is writing so he uses   * user submits the form, the data gets stored in the database, and displays fine. * user decides to edit his post, makes some changes, resubmits the form, and hey presto! his layout is broken. This is because the   tags in the databases got converted to whitespaces in the textarea when the user edited his content, and therefor got saved to the database as whitespaces as well. The w3c defines TEXTAREA's content as being PCDATA, which from what I understand allows entities (as well as markup, curiously enough). So, whilst all entities contained in CDATA (eg attributes etc) fields should indeed be converted to plain chars, there's doesn't actually seem to be any reason for doing this for PCDATA - it seems to me that Moz should allow all entities (not just & ) to pass through to the user in the textarea content. I just thought I'd point it out - not make or break, it just seemed to me to be slightly inconsistent behaviour.
Status: VERIFIED → UNCONFIRMED
Resolution: INVALID → ---
Comment 6•20 years ago
|
||
Entities should be expanded in PCDATA (as far as I can find). This is still INVALID. You're going to have to fix this on the web app's side (e.g., do extra processing on the data in the database or something like that).
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago → 20 years ago
Resolution: --- → INVALID
Comment 7•20 years ago
|
||
This bug is probably a consequence of bug #194498.
You need to log in
before you can comment on or make changes to this bug.
Description
•