mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Changing second half of script placeholders
This commit is contained in:
parent
8acd3a5060
commit
31d2ed150f
1 changed files with 4 additions and 2 deletions
|
@ -7,8 +7,10 @@ var formatMarkdown = Ember.Handlebars.makeBoundHelper(function (markdown) {
|
|||
var html = '';
|
||||
|
||||
// replace script and iFrame
|
||||
markdown = markdown.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '```\nEmbedded JavaScript\n```');
|
||||
markdown = markdown.replace(/<iframe\b[^<]*(?:(?!<\/iframe>)<[^<]*)*<\/iframe>/gi, '```\nEmbedded IFrame\n```');
|
||||
markdown = markdown.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
|
||||
'<pre class="js-embed-placeholder">Embedded JavaScript</pre>');
|
||||
markdown = markdown.replace(/<iframe\b[^<]*(?:(?!<\/iframe>)<[^<]*)*<\/iframe>/gi,
|
||||
'<pre class="iframe-embed-placeholder">Embedded iFrame</pre>');
|
||||
|
||||
// convert markdown to HTML
|
||||
html = showdown.makeHtml(markdown || '');
|
||||
|
|
Loading…
Add table
Reference in a new issue