- Affected version
- 2.1.2
If the first post of a thread contains a tab, the resulting schema.org
DiscussionForumPosting
JSON data is broken as the tab is not converted to \t:\XF:\Template\Templater::filterEscape()
assigns the passed in type json
to $escape
, but \XF::escapeString()
does not handle tabs:
PHP:
case 'json':
$value = strtr($value, [
'\\' => '\\\\',
'"' => '\\"',
"\r" => '\r',
"\n" => '\n',
'/' => '\\/',
'<!' => '\u003C!'
]);
return $value;