mirror of
https://codeberg.org/TicklishHoneyBee/CLIte.git
synced 2026-03-11 09:04:37 +00:00
fix htmlEncode stripping the last character
This commit is contained in:
parent
9cff3a7c10
commit
ba46d0685b
1 changed files with 1 additions and 1 deletions
|
|
@ -1292,7 +1292,7 @@ clite.lib = {
|
|||
// makes text html safe
|
||||
htmlEncode:function(txt) {
|
||||
var rtxt = txt.replace(/&/g, '&').replace(/>/g, '>').replace(/</g, '<');
|
||||
if (rtxt.length > 0 && rtxt[rtxt.length-1])
|
||||
if (rtxt.length > 0 && rtxt[rtxt.length-1] == ' ')
|
||||
return rtxt.substring(0,rtxt.length-1)+' ';
|
||||
return rtxt;
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue