Opened 12 years ago

Closed 12 years ago

#4023 closed defect (invalid)

Rich-Text Editor should generate HTML that is valid XML

Reported by: guest Owned by: liucougar
Priority: high Milestone: 1.1
Component: Editor Version: 0.9
Keywords: editor rich text valid xml Cc:
Blocked By: Blocking:

Description

While I think the ultimate goal should be for the Rich-Text Editor to generate XHTML Strict, in the interim, it should at least generate valid XML.

We have a need to take the contents of the Rich-Text Editor, pass it back to the server, add additional XML, and then perform an XSL transformation. If the editor contents aren't valid XML, this becomes difficult at best.

I've only noticed one item so far, but everything should be examined for XML validity. The one invalid item I've seen is the generation of BR tags. These should be self-closing [<br/>], but are instead generated as a start tag [<br>].

Change History (4)

comment:1 Changed 12 years ago by bill

Milestone: 0.91.1

I think there's already a mechanism in editor for adding filters on save, so this filter could be added to dojox. I want to be careful about what features we include in dijit for the editor.

comment:2 Changed 12 years ago by guest

Bill, Your response puzzles me. I think that you may have mistaken my second paragraph as a request for enhancing the Rich-Text Editor. That is *not* the case. It is merely a Use Case for why we need the Rich-Text Editor to generate valid XML.

When entering a newline in a Rich-Text Editor, Dojo creates a BR tag with this form: <br>. I'm saying that I think it should create this: <br/>.

The unclosed BR tag is invalid XML, and not very good HTML either.

Thanks, Rich

comment:3 Changed 12 years ago by guest

Bill,

Looks like I was the one who was truly confused...

I had been using Firefox's "View Selection Source" to see the HTML that was being generated by the editor. What I see there is <br> tags. When I went the next step and called the editor's getValue method, I now see <br /> tags.

So, it looks like this really isn't an issue at all. Looks like this can simply be closed.

Thanks, Rich

comment:4 Changed 12 years ago by bill

Resolution: invalid
Status: newclosed

Oh ok, well that's an easy fix. :-)

Note: See TracTickets for help on using tickets.