fix "phishing" prevention
@@ -171,6 +171,7 @@ app.config(configRouting).config([
markedProvider.setRenderer({
link: function(href, title, text) {
if (urlSanitizationRegex.test(href)) {
+ if (text === href) {
return (
'<a href="' +
href +
@@ -180,6 +181,19 @@ app.config(configRouting).config([
text +
"</a>"
);
+ } else {
+ return (
+ "[" +
+ text +
+ '](<a href="' +
+ href +
+ '"' +
+ (title ? ' title="' + title + '"' : "") +
+ ' target="_blank">' +
+ href +
+ "</a>)"
+ );
+ }
} else {
return text;
}
