mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-31 11:02:37 +01:00
escape literal & with the HTML entity in :set help string
This commit is contained in:
@@ -61,6 +61,7 @@ vimperator.help = function(section, easter) //{{{
|
||||
//usage = usage.replace(/[^b][^r][^\/]>/g, ">");
|
||||
usage = usage.replace(/</g, "<");
|
||||
usage = usage.replace(/>/g, ">");
|
||||
usage = usage.replace(/&/g, "&");
|
||||
usage = usage.replace(/\\n/g, "<br/>");
|
||||
// color [count], [!], {arg} and [arg] in the usage, not nice and error prone but the regexp work (for now)
|
||||
usage = usage.replace(/({[^}]+})/g, "<span class=\"argument\">$1</span>"); // required args
|
||||
|
||||
Reference in New Issue
Block a user