Closed
Bug 1025711
Opened 10 years ago
Closed 10 years ago
[email/sanitizer] Quiet bleach.js CSS parser errors
Categories
(Firefox OS Graveyard :: Gaia::E-Mail, defect)
Tracking
(b2g-v2.0 affected, b2g-v2.1 fixed)
RESOLVED
FIXED
2.0 S4 (20june)
People
(Reporter: asuth, Assigned: asuth)
Details
Attachments
(1 file)
The CSS parser in bleach.js can get very upset with the CSS from emails we feed it and can output a lot of warnings/errors that we don't care about but could seem like things we care about. Better to not log them at all.
Assignee | ||
Comment 1•10 years ago
|
||
Note that the CSS parser files for some reason have ^M's so the patches do too. git diff may show this without conveying that they're everywhere. I'm not doing anything about that in this patch.
Comment 2•10 years ago
|
||
Comment on attachment 8440469 [details] [review]
quiet CSS warnings/errors
Ideally, the modules would allow a "debug" flag or verbose option that would allow optionally printing these for deep debug cases, but given that this is a fork of an existing project, this is is a more targeted change.
I was hoping this would help with some errors I see for LinkedIn emails, but on closer inspection, these look like Gecko CSS parser warnings:
E/GeckoConsole( 6285): [JavaScript Warning: "Dangling combinator. Ruleset ignored due to bad selector." {file: "app://email.gaiamobile.org/index.html#" line: 6 column: 17 source: "*[class].hero_bg ;}}*[class].bg_anniversary,*[class].bg_position ;}}*[class].bg_endorsement.digest,*[class].bg_skill ;}}*[class].bg_post ;}}*[class].bg_connection ;}}*[class].bg_otherprofileupdates ;}}*[class].bg_pictureshare ;}}*[class].hero_bg_ovr_none ;}}html { }}body { background-color: #DFDFDF; padding: 0; margin: 0; width: 100%; margin: 0 auto; }"}]
So, a separate thing. For the purpose of this ticket, r+ on the pull request. Tested on device with minification turned on.
Attachment #8440469 -
Flags: review?(jrburke) → review+
Assignee | ||
Comment 3•10 years ago
|
||
Debug-wise, agreed. I think it would be most useful to direct the CSS parser's logging to a discrete logging channel that's not output to logcat but would show up in unit tests and in secret debug mode/its successor. I'm going to punt on filing a bug on this for now since we don't have a need yet and there will be some churn as we overhaul back-end logging/secret debug mode a bit.
Yes, those look like Gecko CSS warnings. I suppose if we ever see those it's probably an indication that our sanitizer could do a better job since something Gecko throws away at display time is just wasted storage space for us.
Assignee | ||
Comment 4•10 years ago
|
||
landed on bleach.js/worker-thread-friendly:
https://github.com/mozilla-b2g/bleach.js/pull/8
https://github.com/mozilla-b2g/bleach.js/commit/d2d833dec4b6a8d10793e2e4605e847af70cf382
landed on gelam/master:
https://github.com/mozilla-b2g/gaia-email-libs-and-more/pull/314
https://github.com/mozilla-b2g/gaia-email-libs-and-more/commit/7a50a3d34058214174841146ab96e79b9d5735ed
landed on gaia/master:
https://github.com/mozilla-b2g/gaia/pull/20652
https://github.com/mozilla-b2g/gaia/commit/e73e53a9a6fb7e57aba00d3da279edc12f0180e3
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-b2g-v2.0:
--- → affected
status-b2g-v2.1:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 2.0 S4 (20june)
You need to log in
before you can comment on or make changes to this bug.
Description
•