1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 13:17:58 +01:00

:bmarks [filter] works again, now even with -tags=foo filtering

This commit is contained in:
Martin Stubenschrott
2007-10-18 16:45:22 +00:00
parent 4f1dacc7a2
commit 129f7f23f7
5 changed files with 149 additions and 116 deletions

View File

@@ -29,9 +29,13 @@ the terms of any one of the MPL, the GPL or the LGPL.
vimperator.util = {
escapeHTML: function(str)
{
var e = window.content.document.createElement("div");
e.appendChild(window.content.document.createTextNode(str));
return e.innerHTML;
// XXX: the following code is _much- slower then a simple .replace()
// :history display went down from 2 to 1 second after changing
//
// var e = window.content.document.createElement("div");
// e.appendChild(window.content.document.createTextNode(str));
// return e.innerHTML;
return str.replace(/</, "&lt;").replace(/>/, "&gt;");
},
// TODO: use :highlight color groups