Ox.parseHTML -> Ox.sanitizeHTML, Ox.encodeHTML -> Ox.encodeHTMLEntities, Ox.decodeHTML -> Ox.decodeHTMLEntities
This commit is contained in:
parent
fc713cabb6
commit
5aac6ebe22
2 changed files with 10 additions and 6 deletions
|
@ -60,7 +60,7 @@ pandora.ui.importAnnotations = function(data) {
|
|||
function addAnnotation() {
|
||||
if(srt.length>0) {
|
||||
var data = srt.shift();
|
||||
data.text = Ox.parseHTML(data.text)
|
||||
data.text = Ox.sanitizeHTML(data.text)
|
||||
.replace(/<br[ /]*?>\n/g, '\n')
|
||||
.replace(/\n\n/g, '<br>\n')
|
||||
.replace(/\n/g, '<br>\n');
|
||||
|
|
|
@ -172,10 +172,14 @@ pandora.ui.listInfo = function() {
|
|||
$title = Ox.Editable({
|
||||
editable: editable,
|
||||
format: function(value) {
|
||||
return Ox.encodeHTML(Ox.decodeHTML(
|
||||
item.status == 'featured' || editable
|
||||
? value
|
||||
: item.user + ': ' + value))
|
||||
// FIXME: document what we're trying to do here!
|
||||
return Ox.encodeHTMLEntities(
|
||||
Ox.decodeHTMLEntities(
|
||||
item.status == 'featured' || editable
|
||||
? value
|
||||
: item.user + ': ' + value
|
||||
)
|
||||
)
|
||||
},
|
||||
tooltip: editable ? 'Doubleclick to edit title' : '',
|
||||
value: item.name,
|
||||
|
@ -189,7 +193,7 @@ pandora.ui.listInfo = function() {
|
|||
});
|
||||
},
|
||||
submit: function(data) {
|
||||
data.value = Ox.decodeHTML(data.value);
|
||||
data.value = Ox.decodeHTMLEntities(data.value);
|
||||
if (data.value != item.name) {
|
||||
pandora.api.editList({
|
||||
id: list,
|
||||
|
|
Loading…
Reference in a new issue