mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-24 08:12:24 +02:00
Desktop: Fixed an issue that could cause certain notes not to render when they contain an empty STYLE tag
This commit is contained in:
parent
e73535ace0
commit
0a766d7314
@ -32,6 +32,19 @@ describe('HtmlToHtml', () => {
|
||||
css: '',
|
||||
},
|
||||
],
|
||||
// cSpell:disable
|
||||
[
|
||||
`<style></style>
|
||||
<p><br></p><div class="moz-forward-container"><br><br>-------- Message transféré --------<table class="moz-email-headers-table" cellspacing="0" cellpadding="0" border="0"><tbody><tr><th valign="BASELINE" nowrap="nowrap" align="RIGHT">Sujet :</th><td>
|
||||
Your car rental booking DC-7706328 is confirmed (pick-up on 1 October 2024)</td></tr></tbody></table><style type="text/css"></style>`,
|
||||
{
|
||||
html: `
|
||||
<p><br></p><div class="moz-forward-container"><br><br>-------- Message transféré --------<table class="moz-email-headers-table" cellspacing="0" cellpadding="0" border="0"><tbody><tr><th valign="BASELINE" nowrap="nowrap" align="RIGHT">Sujet :</th><td>
|
||||
Your car rental booking DC-7706328 is confirmed (pick-up on 1 October 2024)</td></tr></tbody></table><style type="text/css"></style>`,
|
||||
css: '',
|
||||
},
|
||||
],
|
||||
// cSpell:enable
|
||||
];
|
||||
|
||||
for (const t of testCases) {
|
||||
|
@ -180,7 +180,7 @@ export default class HtmlToHtml implements MarkupRenderer {
|
||||
}
|
||||
}
|
||||
|
||||
const splitHtmlRegex = /^<style>([\s\S]*)<\/style>([\s\S]*)$/i;
|
||||
const splitHtmlRegex = /^<style>([\s\S]*?)<\/style>([\s\S]*)$/i;
|
||||
|
||||
// This function is designed to handle the narrow case of HTML generated by the
|
||||
// HtmlToHtml class and used by the Rich Text editor, and that's with the STYLE
|
||||
|
Loading…
Reference in New Issue
Block a user