If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Kuma: too strict content sanitizer breaks tables presentation

RESOLVED FIXED

Status

Mozilla Developer Network
Editing
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Nickolay_Ponomarev, Assigned: Nickolay_Ponomarev)

Tracking

Details

(Whiteboard: t=2012-06-19)

(Assignee)

Description

5 years ago
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.
(Assignee)

Comment 1

5 years ago
https://github.com/mozilla/kuma/pull/237

Comment 2

5 years ago
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.
(Assignee)

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: t=2012-06-19
Version: Kuma → unspecified
Component: Docs Platform → Editing
Product: Mozilla Developer Network → Mozilla Developer Network
You need to log in before you can comment on or make changes to this bug.