1
0
Fork 0
forked from 0x2620/oxjs

Editables: when formatting input value, make sure < and > stay < and >

This commit is contained in:
rolux 2014-02-04 06:46:28 +00:00
commit 0940d7317b
2 changed files with 8 additions and 4 deletions

View file

@ -190,8 +190,10 @@ Ox.Editable = function(options, self) {
function formatInputValue() {
return Ox.decodeHTMLEntities(
self.options.type == 'input'
? self.options.value
: self.options.value.replace(/<br\/?><br\/?>/g, '\n\n')
? self.options.value
: self.options.value.replace(/<br\/?><br\/?>/g, '\n\n')
.replace(/&lt;/g, '&amp;lt;')
.replace(/&gt;/g, '&amp;gt;')
);
}