mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Update forum_fn.js
This commit is contained in:
parent
3584ef7eca
commit
343e3588ae
1 changed files with 15 additions and 1 deletions
|
@ -4,6 +4,20 @@
|
||||||
* phpBB3 forum functions
|
* phpBB3 forum functions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Escape HTML special characters
|
||||||
|
*/
|
||||||
|
function escapeHtml(text) {
|
||||||
|
var map = {
|
||||||
|
'&': '&',
|
||||||
|
'<': '<',
|
||||||
|
'>': '>',
|
||||||
|
'"': '"',
|
||||||
|
"'": '''
|
||||||
|
};
|
||||||
|
return text.replace(/[&<>"']/g, function(m) { return map[m]; });
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find a member
|
* Find a member
|
||||||
*/
|
*/
|
||||||
|
@ -599,7 +613,7 @@ function parseDocument($container) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((text.length && text !== '-') || cell.children().length) {
|
if ((text.length && text !== '-') || cell.children().length) {
|
||||||
cell.prepend('<dfn style="display: none;">' + headers[column] + '</dfn>');
|
cell.prepend('<dfn style="display: none;">' + escapeHtml(headers[column]) + '</dfn>');
|
||||||
} else {
|
} else {
|
||||||
cell.addClass('empty');
|
cell.addClass('empty');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue