Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/render/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ function link(node, entering) {
var attrs = this.attrs(node);
if (entering) {
if (!(this.options.safe && potentiallyUnsafe(node.destination))) {
attrs.push(['href', this.esc(node.destination, false)]);
attrs.push(['href', this.esc(node.destination)]);
}
if (node.title) {
attrs.push(['title', this.esc(node.title, false)]);
attrs.push(['title', this.esc(node.title)]);
}
this.tag('a', attrs);
} else {
Expand All @@ -79,7 +79,7 @@ function image(node, entering) {
if (this.options.safe && potentiallyUnsafe(node.destination)) {
this.lit('<img src="" alt="');
} else {
this.lit('<img src="' + this.esc(node.destination, false) +
this.lit('<img src="' + this.esc(node.destination) +
'" alt="');
}
}
Expand All @@ -88,7 +88,7 @@ function image(node, entering) {
this.disableTags -= 1;
if (this.disableTags === 0) {
if (node.title) {
this.lit('" title="' + this.esc(node.title, false));
this.lit('" title="' + this.esc(node.title));
}
this.lit('" />');
}
Expand Down Expand Up @@ -143,7 +143,7 @@ function code_block(node) {
var info_words = node.info ? node.info.split(/\s+/) : []
, attrs = this.attrs(node);
if (info_words.length > 0 && info_words[0].length > 0) {
attrs.push(['class', 'language-' + this.esc(info_words[0], false)]);
attrs.push(['class', 'language-' + this.esc(info_words[0])]);
}
this.cr();
this.tag('pre');
Expand Down Expand Up @@ -242,7 +242,7 @@ function custom_block(node, entering) {
/* Helper methods */

function out(s) {
this.lit(this.esc(s, false));
this.lit(this.esc(s));
}

function attrs (node) {
Expand Down