summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2023-10-24 22:58:10 +0300
committerAndrew Dolgov <[email protected]>2023-10-24 22:58:10 +0300
commit0a5507d3bd79d04c860455664f919bf8e7274fda (patch)
tree022cd90e8af89463beb95f0b794c2cdb31599dd6
parent69c1c629927cd78286fc6c8d61b5b5ad78245508 (diff)
Revert "api: escape newlines in headline content HTML object"
This reverts commit ed43a7336925c1a97cad8768afa52c5c46f299bb.
-rwxr-xr-xclasses/api.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/classes/api.php b/classes/api.php
index 3af747644..3a3ae0e63 100755
--- a/classes/api.php
+++ b/classes/api.php
@@ -815,6 +815,7 @@ class API extends Handler {
$headline_row["excerpt"] = $line["content_preview"];
if ($show_content) {
+
if ($sanitize_content) {
$headline_row["content"] = Sanitizer::sanitize(
$line["content"],
@@ -867,8 +868,6 @@ class API extends Handler {
$hook_object);
$headline_row["content"] = DiskCache::rewrite_urls($headline_row['content']);
- $headline_row["content"] = str_replace(["\r", "\n"], ["\\r", "\\n"], $headline_row["content"]);
-
}
array_push($headlines, $headline_row);