Closed Bug 223008 Opened 21 years ago Closed 21 years ago

Failed replacement of space reference value inside HTML tags when viewed in a form textarea

Categories

(Core :: DOM: HTML Parser, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 166866

People

(Reporter: mpn, Unassigned)

References

()

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030827 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030827 When using a reference value for a space ( "&#032" ) and viewing inside a form textarea, the reference value is not tranlated properly. For example: <br /> will be <br /> Note: The reference space IS translated properly OUTSIDE of HTML tags Reproducible: Always Steps to Reproduce: 1. Go To The Example URL 2. Put Some HTML into The Text Area that contains spaces like XHTML style break ( fill in the title too ) 3. Hit Submit and look at the textarea below the preview Actual Results: <br /> will be <br /> Expected Results: <br /> should be <br />
I don't get this bug. It's a weird thing. I can't reproduce it in data: URI test cases. But anyway, nothing to do with the DOM.
Assignee: dom_bugs → parser
Component: DOM HTML → Parser
Yes, I was unsure if it was a DOM issue or not. What would you classify this as so I can reassign it, and who to reassign to?
Any chance of providing a testcase showing the problem? That would help a lot...
Kiril: don't worry, I reasigned it (HTML: Parser). bz: I tried making one for a while, but couldn't work out what the problem was. Someone needs to take the page returned by the script at the URL, and minimise it.
Yes, the test URL would be the place to see it. http://mpn.illearth.net/html/submit.php Keep the HTML simple as it will be stripped by the sanitizer if the tag is not allowed. The HTML is generally a mess, glad to say the majority of it is not mine. :) Some additional details that might help. Input is HTML sanitized, then control returns, line feeds, tabs, spaces, and ' ' ( in that order ) are converted to reference values to retain formatting when the content is brought back into the textarea for editing and for easy formatting replacements on HTML output. To fix the problem I dumped the space conversion to reference value and so far it seems to have no affect on formatting. This can be seen on http://www.myphpnuke.com/submit.php. The output you would be interested in is around line 203 of the source output. <TEXTAREA class="textbox" wrap="virtual" cols="70" rows="18" name="story"><br&#032;/><br&#032;/><br&#032;/></TEXTAREA>
Attached file testcase
hixie, you removed the url from the URL field when you reassigned. Hence my question in comment 3. The problem, as usual, is sticking of unescaped tags in the <textarea>. Just escaping the '<' at the beginning of the tag name fixed this bug. This is a duplicate of the other issues with unescaped tag stuff in textarea, I think....
Oops, sorry about that. *** This bug has been marked as a duplicate of 166866 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: