Skip to content
Browse files

Fix imagesrc regex

  • Loading branch information...
1 parent f1f8e46 commit ceb6929506864aead3a274bb8fbb69bd090eaae9 @alexdunae committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 cm-preview.js
View
3 cm-preview.js
@@ -26,7 +26,8 @@ body[0].innerHTML = repl;
var imgs = document.getElementsByTagName('img');
for(var i = 0; i < imgs.length; i++) {
var src = imgs[i].getAttribute('src', 2);
- if (/\$imagesrc\$/i.test(src)) {
+ if (/\$imagesrc/i.test(src)) {
+ console.log('match src');
// unescape attributes for Firefox
if (src.indexOf('%') !== false) {
src = unescape(src);

0 comments on commit ceb6929

Please sign in to comment.
Something went wrong with that request. Please try again.