https://bugzilla.wikimedia.org/show_bug.cgi?id=54577
Web browser: ---
Bug ID: 54577
Summary: VisualEditor: Rendering of <source> MWExtensionNode is
empty after the user edits it
Product: VisualEditor
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: ContentEditable
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Classification: Unclassified
Mobile Platform: ---
1. Create a page with <source lang="JavaScript">some content here</source>
2. Edit the page in VE. Note that the <source> tag renders correctly
3. Use the alien tag inspector to edit the contents of the <source> tag
4. The <source> tag rerenders as an empty block
This is because the HTML <source> tag is self-closing and cannot have any
content. This leads to strange situations like:
>>> extensionNode[0]
<source lang="JavaScript">whee</source>
>>> extensionNode[0].outerHTML
"<source lang="JavaScript"></source>"
To avoid the HTML behavior for this and possibly other tag names, we should
create an XML node rather than an HTML node to build the wikitext string for
the preview.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l