1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 03:04:09 +02:00

Merge pull request #73 from phpbb/ticket/security-283

[ticket/security-283] Use jQuery to generate HTML for page from page data
This commit is contained in:
Marc Alexander
2025-03-08 11:23:40 +01:00
committed by GitHub
3 changed files with 36 additions and 21 deletions

View File

@@ -650,7 +650,7 @@ function parseDocument($container) {
html = $children.html();
}
$block.append((first ? '' : '<br />') + html);
$block.append((first ? '' : '<br>') + html);
first = false;
});
@@ -670,7 +670,7 @@ function parseDocument($container) {
// Find all headers, get contents
$list.prev('.topiclist').find('li.header dd').not('.mark').each(function() {
headers.push($(this).text());
headers.push($("<div>").text($(this).text()).html());
headersLength++;
});
@@ -707,7 +707,7 @@ function parseDocument($container) {
html = headers[i] + ': <strong>' + html + '</strong>';
}
$block.append((first ? '' : '<br />') + html);
$block.append((first ? '' : '<br>') + html);
first = false;
});
@@ -773,7 +773,9 @@ function parseDocument($container) {
}
if ((text.length && text !== '-') || cell.children().length) {
cell.prepend('<dfn style="display: none;">' + headers[column] + '</dfn>');
if (headers[column].length) {
cell.prepend($("<dfn>").css('display', 'none').text(headers[column]));
}
} else {
cell.addClass('empty');
}