summaryrefslogtreecommitdiff
path: root/js/lib
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib')
-rw-r--r--js/lib/common.js6
-rw-r--r--js/lib/html.js17
-rw-r--r--js/lib/xml.js2
3 files changed, 5 insertions, 20 deletions
diff --git a/js/lib/common.js b/js/lib/common.js
index 05640e3..06486d3 100644
--- a/js/lib/common.js
+++ b/js/lib/common.js
@@ -1,5 +1,7 @@
"use strict";
+/* global unescape */
+
var entityToChar = require('./html5-entities.js').entityToChar;
var ENTITY = "&(?:#x[a-f0-9]{1,8}|#[0-9]{1,8}|[a-z][a-z0-9]{1,31});";
@@ -35,7 +37,7 @@ var unescapeString = function(s) {
var normalizeURI = function(uri) {
return encodeURI(unescape(uri));
-}
+};
var replaceUnsafeChar = function(s) {
switch (s) {
@@ -66,5 +68,5 @@ var escapeXml = function(s, preserve_entities) {
module.exports = { unescapeString: unescapeString,
normalizeURI: normalizeURI,
- escapeXml: escapeXml,
+ escapeXml: escapeXml
};
diff --git a/js/lib/html.js b/js/lib/html.js
index 3f2c1dd..db87c22 100644
--- a/js/lib/html.js
+++ b/js/lib/html.js
@@ -225,7 +225,7 @@ var renderNodes = function(block) {
break;
default:
- throw("Unknown node type " + node.t);
+ throw "Unknown node type " + node.t;
}
}
@@ -233,21 +233,6 @@ var renderNodes = function(block) {
return buffer;
};
-var replaceUnsafeChar = function(s) {
- switch (s) {
- case '&':
- return '&';
- case '<':
- return '&lt;';
- case '>':
- return '&gt;';
- case '"':
- return '&quot;';
- default:
- return s;
- }
-};
-
// The HtmlRenderer object.
function HtmlRenderer(options){
return {
diff --git a/js/lib/xml.js b/js/lib/xml.js
index 79b6957..e8fba6a 100644
--- a/js/lib/xml.js
+++ b/js/lib/xml.js
@@ -30,7 +30,6 @@ var toTagName = function(s) {
var renderNodes = function(block) {
var attrs;
- var info_words;
var tagname;
var walker = block.walker();
var event, node, entering;
@@ -39,7 +38,6 @@ var renderNodes = function(block) {
var disableTags = 0;
var indentLevel = 0;
var indent = ' ';
- var grandparent;
var unescapedContents;
var container;
var selfClosing;