Skip to content

Commit abc007f

Browse files
newgeneGolmote
authored andcommitted
fixed an rendering issue for encoded urls (#1173)
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.
1 parent 310990b commit abc007f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugins/autolinker/prism-autolinker.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ Prism.hooks.add('wrap', function(env) {
7171

7272
env.attributes.href = href;
7373
}
74+
env.content = decodeURIComponent(env.content);
7475
});
7576

76-
})();
77+
})();

0 commit comments

Comments
 (0)