Closed Bug 28789 Opened 26 years ago Closed 25 years ago

editor does not escaped text when create anchor or link

Categories

(Core :: DOM: Editor, defect, P3)

defect

Tracking

()

VERIFIED WONTFIX
mozilla0.9

People

(Reporter: ftang, Assigned: cmanske)

References

Details

When you try to create anchor or link, the editor does NOT create the anchor in the escaped form or 1. open editor 2. type some text which need to be escape in URI, say- "+this~is&some#text" or some non ASCII characters. 3. select them and create a anchor 4. the exitor will try to use the select text as the default anchor name, however, it does NOT escape them . This will cause a lot of problem if we escape the later. Suggestion- escape when we create the anchor, and therefore we should see them in the escaped form in the insert link dialogbox. 4.x work as this way but I think it is very wrong. Currently it does replace space with _ but I don't think that is enough.
Frank: Please tell me what method(s) to call to do this.
Status: NEW → ASSIGNED
Target Milestone: M16
Blocks: 14744
Although I know how to do the escaping/unescaping, it turned out not to be necessary since we strip out all not alphanumeric characters anyway. But we still might want to do it for the case of documents we didn't write. Does anyone think this is a problem we should address?
Moving bugs to M17 to concentrate on features in M16
Target Milestone: M16 → M17
moving to future
Target Milestone: M17 → Future
Target Milestone: Future → mozilla0.9
After much thought and experimenting, I don't think there is a problem here. Note that when typing in a page in Composer, including typing in textfields in dialogs such as the Named Anchor and Link dialogs, users may enter foreign characters using standard keyboard techniques or using the "Insert Character" dialog when in the page. If you select text and create a named anchor, the foreign character looks correct in the Named Anchor dialog textfield and is "escaped" correctly when written to the HTML attribute. Creating a link to a named anchor also works correctly; the foreign character looks like a single character in the Link URI textfield and again it is escaped only in the text in HTML SRC attribute. You should *not* type "escaped" text like an entity (e.g., "ä") directly in a document or URI textfield. Escaped text may only be typed in the HTML Source editor.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → WONTFIX
verified in 1/12 build.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.