mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-01 13:14:16 +08:00
fix(style): ignore corrupt inline styles
This commit is contained in:
parent
e14e462f62
commit
6a6619a106
1 changed files with 8 additions and 1 deletions
|
@ -333,7 +333,14 @@ class Application
|
|||
|
||||
ipc.on 'inline-style-parse', (event, {body, clientId}) =>
|
||||
juice = require 'juice'
|
||||
body = juice(body)
|
||||
try
|
||||
body = juice(body)
|
||||
catch
|
||||
# If the juicer fails (because of malformed CSS or some other
|
||||
# reason), then just return the body. We will still push it
|
||||
# through the HTML sanitizer which will strip the style tags. Oh
|
||||
# well.
|
||||
body = body
|
||||
# win = BrowserWindow.fromWebContents(event.sender)
|
||||
event.sender.send('inline-styles-result', {body, clientId})
|
||||
|
||||
|
|
Loading…
Reference in a new issue