X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/c8f355dd7205132ecd2c1bc27dc4e8944fdd6252..4447439079a88835d69524ab36ba88ecda384142:/forum/skins/default/media/js/wmd/showdown.js diff --git a/forum/skins/default/media/js/wmd/showdown.js b/forum/skins/default/media/js/wmd/showdown.js index d223f45..b890fa8 100644 --- a/forum/skins/default/media/js/wmd/showdown.js +++ b/forum/skins/default/media/js/wmd/showdown.js @@ -498,6 +498,11 @@ var _DoAnchors = function(text) { */ text = text.replace(/(\[([^\[\]]+)\])()()()()()/g, writeAnchorTag); + // Prevent executing JavaScript from the Anchor href. + text = text.replace(/(([^<]+)<\/a>)/g, function() { + return arguments[3]; + }); + return text; }