Skip to content

Commit

Permalink
fixed an rendering issue for encoded urls (#1173)
Browse files Browse the repository at this point in the history
If a url contains some special characters, like space or "<", it needs to be encoded in order to be recognized as a valid url. Adding a decoding step allows these urls to render correctly.
  • Loading branch information
newgene authored and Golmote committed Sep 9, 2017
1 parent 310990b commit abc007f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/autolinker/prism-autolinker.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Prism.hooks.add('wrap', function(env) {

env.attributes.href = href;
}
env.content = decodeURIComponent(env.content);
});

})();
})();

0 comments on commit abc007f

Please sign in to comment.