mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Updating HTML for script placeholders
This commit is contained in:
parent
c5d046d452
commit
8acd3a5060
1 changed files with 2 additions and 2 deletions
|
@ -6,9 +6,9 @@ var formatHTML = Ember.Handlebars.makeBoundHelper(function (html) {
|
||||||
|
|
||||||
// replace script and iFrame
|
// replace script and iFrame
|
||||||
escapedhtml = escapedhtml.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
|
escapedhtml = escapedhtml.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
|
||||||
'<pre><code>Embedded JavaScript</code></pre>');
|
'<pre class="js-embed-placeholder">Embedded JavaScript</pre>');
|
||||||
escapedhtml = escapedhtml.replace(/<iframe\b[^<]*(?:(?!<\/iframe>)<[^<]*)*<\/iframe>/gi,
|
escapedhtml = escapedhtml.replace(/<iframe\b[^<]*(?:(?!<\/iframe>)<[^<]*)*<\/iframe>/gi,
|
||||||
'<pre><code>Embedded IFrame</code></pre>');
|
'<pre class="iframe-embed-placeholder">Embedded iFrame</pre>');
|
||||||
|
|
||||||
// sanitize HTML
|
// sanitize HTML
|
||||||
escapedhtml = html_sanitize(escapedhtml, cajaSanitizers.url, cajaSanitizers.id);
|
escapedhtml = html_sanitize(escapedhtml, cajaSanitizers.url, cajaSanitizers.id);
|
||||||
|
|
Loading…
Add table
Reference in a new issue