summaryrefslogtreecommitdiff
path: root/inc/functions.php
diff options
context:
space:
mode:
authorMichael Foster <savetheinternet@tinyboard.org>2013-08-31 13:23:29 +1000
committerMichael Foster <savetheinternet@tinyboard.org>2013-08-31 13:23:29 +1000
commitd166fc70bd6378c3f72b7f40e71a79fcb63bc1f2 (patch)
tree3b1c295245e25c10de8d27b3fd50b7cccfcb423e /inc/functions.php
parentf1b1d41230a41e70d098f4e04f138bc190154e39 (diff)
Fix \t in posts (editing posts, and HTML Tidy)
Diffstat (limited to 'inc/functions.php')
-rw-r--r--inc/functions.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/inc/functions.php b/inc/functions.php
index ccf21c9e..b9d135cf 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -1580,9 +1580,6 @@ function markup(&$body, $track_cites = false) {
}
}
- // replace tabs with 8 spaces
- $body = str_replace("\t", ' ', $body);
-
$tracked_cites = array();
// Cites
@@ -1748,6 +1745,7 @@ function markup(&$body, $track_cites = false) {
if ($config['markup_repair_tidy']) {
$tidy = new tidy();
+ $body = str_replace("\t", '&#09;', $body);
$body = $tidy->repairString($body, array(
'doctype' => 'omit',
'bare' => true,
@@ -1759,10 +1757,12 @@ function markup(&$body, $track_cites = false) {
'output-html' => true,
'newline' => 'LF',
'quiet' => true,
-
), 'utf8');
$body = str_replace("\n", '', $body);
}
+
+ // replace tabs with 8 spaces
+ $body = str_replace("\t", ' ', $body);
return $tracked_cites;
}