0
Fork 0
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:
Hannah Wolfe 2014-07-31 17:42:43 +01:00
parent c5d046d452
commit 8acd3a5060

View file

@ -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);