mirror of
https://github.com/openwrt/luci.git
synced 2026-02-04 12:06:01 +08:00
luci-lilb-nixio: Code quality fixes
future variants could use en/decodeURIComponent ordering is important when handling "&" Signed-off-by: Paul Donald <newtwen@gmail.com>
This commit is contained in:
@@ -5943,10 +5943,10 @@ String.prototype.htmlEncode = function()
|
||||
return(this.replace(/&/mg,"&").replace(/</mg,"<").replace(/>/mg,">").replace(/\"/mg,"""));
|
||||
}
|
||||
|
||||
// Convert "&" to &, "<" to <, ">" to > and """ to "
|
||||
// Convert "<" to <, ">" to >, """ to " and "&" to & (& handled last for security reasons)
|
||||
String.prototype.htmlDecode = function()
|
||||
{
|
||||
return(this.replace(/&/mg,"&").replace(/</mg,"<").replace(/>/mg,">").replace(/"/mg,"\""));
|
||||
return(this.replace(/</mg,"<").replace(/>/mg,">").replace(/"/mg,"\"").replace(/&/mg,"&"));
|
||||
}
|
||||
|
||||
// Parse a space-separated string of name:value parameters where:
|
||||
|
||||
Reference in New Issue
Block a user