aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-03-04 16:26:02 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-03-04 16:26:02 -0800
commit1af7db58eefaa110f2748b7c4dd52f8d022f9aa6 (patch)
treea362aeadc209becd75d3891cf62b08e5a0f234a9
parent2e2a9c1a768dabbdc0eb48a01638b32c55f1073a (diff)
make string constant comments safe for inclusion in html
-rw-r--r--src/jsifier.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index d4d57fc6..b54aace3 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -229,7 +229,7 @@ function JSify(data, functionsOnly, givenFunctions) {
return makeEmptyStruct(type);
} else if (value.intertype === 'string') {
return JSON.stringify(parseLLVMString(value.text)) +
- ' /* ' + value.text.substr(0, 20).replace(/\*/g, '_') + ' */'; // make string safe for inclusion in comment
+ ' /* ' + value.text.substr(0, 20).replace(/[*<>]/g, '_') + ' */'; // make string safe for inclusion in comment
} else {
return alignStruct(handleSegments(value.contents), type);
}