0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Updating HTML for script placeholders

This commit is contained in:
Hannah Wolfe 2014-07-31 17:42:43 +01:00
parent b7bfc35079
commit 687197bf31

View file

@ -6,9 +6,9 @@ var formatHTML = Ember.Handlebars.makeBoundHelper(function (html) {
// replace script and iFrame
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,
'<pre><code>Embedded IFrame</code></pre>');
'<pre class="iframe-embed-placeholder">Embedded iFrame</pre>');
// sanitize HTML
escapedhtml = html_sanitize(escapedhtml, cajaSanitizers.url, cajaSanitizers.id);