[Pkg-mozext-commits] [greasemonkey] 02/25: GM_log truncates at NULL byte
David Prévot
taffit at moszumanska.debian.org
Wed Sep 17 21:14:00 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository greasemonkey.
commit 32f312ad8c5ac460e64d9f8fef95d170c7d5446b
Author: janekptacijarabaci <janekptacijarabaci at centrum.cz>
Date: Thu Jul 31 11:39:16 2014 +0200
GM_log truncates at NULL byte
---
modules/miscapis.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/miscapis.js b/modules/miscapis.js
index 924e1be..fb03d38 100644
--- a/modules/miscapis.js
+++ b/modules/miscapis.js
@@ -241,6 +241,8 @@ GM_ScriptLogger.prototype.consoleService = Components
.getService(Components.interfaces.nsIConsoleService);
GM_ScriptLogger.prototype.log = function(message) {
+ // https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIConsoleService#logStringMessage() - wstring / wide string
+ var message = message.replace(/\0|\u0000/mg, '');
this.consoleService.logStringMessage(this.prefix + '\n' + message);
};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/greasemonkey.git
More information about the Pkg-mozext-commits
mailing list