Closed Bug 759212 Opened 12 years ago Closed 12 years ago

Kuma: too strict content sanitizer breaks tables presentation

Categories

(developer.mozilla.org Graveyard :: Editing, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: asqueella, Assigned: asqueella)

Details

(Whiteboard: t=2012-06-19)

If you try to migrate https://developer.mozilla.org/en/DOM/DOM_event_reference (or save its HTML source) to Kuma, you'll see the @class/@style attributes stripped, leading to a broken looking table (too wide and header row isn't styled appropriately).

In this specific case this HTML source:
  <h2 class="editable">DOM events</h2>
  <table class="standard-table" style="width: auto;"> <tbody> <tr> <td class="header">Event name</td>

Is served by kuma like this:
  <h2 id="DOM_events">DOM events</h2>
  <table> <tbody> <tr> <td>Event name</td>

Attached is a pull request that fixes this particular page, but we should consider checking for this in the migration script, since fixing it later requires re-saving the document and it's hard to figure out what's wrong, since the generated content doesn't match what the editor sees in the CKEditor's source.
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/c797942b62775c0b011af954bd6373852c9d4909
Bug 759212: allow more HTML attributes in content.

Allow attributes commonly used on tables in dekiwiki, such as the one on
https://developer.mozilla.org/en/DOM/DOM_event_reference

https://github.com/mozilla/kuma/commit/931f7e477742cbf6976176c8ccd81740d5732c4e
Merge pull request #237 from nickolay/759212-allow-more-html-attributes

Bug 759212: allow more HTML attributes in content.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: t=2012-06-19
Version: Kuma → unspecified
Component: Docs Platform → Editing
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.