mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 12:35:56 +00:00
wip: feed editor client-side
This commit is contained in:
22
js/App.js
22
js/App.js
@@ -343,16 +343,20 @@ const App = {
|
||||
});
|
||||
},
|
||||
// htmlspecialchars()-alike for headlines data-content attribute
|
||||
escapeHtml: function(text) {
|
||||
const map = {
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
"'": '''
|
||||
};
|
||||
escapeHtml: function(p) {
|
||||
if (typeof p == "string") {
|
||||
const map = {
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
"'": '''
|
||||
};
|
||||
|
||||
return text.replace(/[&<>"']/g, function(m) { return map[m]; });
|
||||
return p.replace(/[&<>"']/g, function(m) { return map[m]; });
|
||||
} else {
|
||||
return p;
|
||||
}
|
||||
},
|
||||
displayIfChecked: function(checkbox, elemId) {
|
||||
if (checkbox.checked) {
|
||||
|
||||
Reference in New Issue
Block a user