Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Unified Diff: native_client_sdk/src/examples/hello_nacl_mounts/example.js

Issue 11887021: [NaCl SDK] Add HTTP mount. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | native_client_sdk/src/examples/hello_nacl_mounts/hello_nacl_mounts.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/examples/hello_nacl_mounts/example.js
diff --git a/native_client_sdk/src/examples/hello_nacl_mounts/example.js b/native_client_sdk/src/examples/hello_nacl_mounts/example.js
index c2376eaebb4f78edf1165770a942a1199f500186..c355b4d08a426a9351e8ce4ed3d7868ddad9d492 100644
--- a/native_client_sdk/src/examples/hello_nacl_mounts/example.js
+++ b/native_client_sdk/src/examples/hello_nacl_mounts/example.js
@@ -140,6 +140,14 @@ function startsWith(s, prefix) {
function logMessage(msg) {
var logEl = document.getElementById('log');
+
+ // Perform some basic escaping.
+ msg = msg.replace(/&/g, '&')
+ .replace(/</g, '&lt;')
+ .replace(/>/g, '&gt;')
+ .replace(/"/g, '&quot;')
+ .replace(/'/g, '&apos;');
+
logEl.innerHTML += msg + '<br>';
}
« no previous file with comments | « no previous file | native_client_sdk/src/examples/hello_nacl_mounts/hello_nacl_mounts.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698