mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Do not treat code tag as block level element (#12432)
When syncing code elements, the inner text used to be escaped, which rendered the actual HTML code instead. This commit overwrites default parser settings to fix the way code tags are handled.
This commit is contained in:
@@ -416,7 +416,12 @@ export default Component.extend({
|
||||
loadScript("/javascripts/diffhtml.min.js").then(() => {
|
||||
window.diff.innerHTML(
|
||||
this.element.querySelector(".d-editor-preview"),
|
||||
cookedElement.innerHTML
|
||||
cookedElement.innerHTML,
|
||||
{
|
||||
parser: {
|
||||
rawElements: ["script", "noscript", "style", "template"],
|
||||
},
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user