1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Merge branch '3.3.x'

This commit is contained in:
Marc Alexander
2020-11-11 21:50:11 +01:00
4 changed files with 16 additions and 5 deletions

View File

@@ -15,6 +15,9 @@ namespace phpbb\textformatter\s9e;
/**
* Text manipulation utilities
*
* In this implementation, "plain text" refers to regular text as it would be inputted by a user.
* "Parsed text" is XML suitable to be reinserted into the database.
*/
class utils implements \phpbb\textformatter\utils_interface
{
@@ -31,7 +34,7 @@ class utils implements \phpbb\textformatter\utils_interface
// Insert a space before <s> and <e> then remove formatting
$xml = preg_replace('#<[es]>#', ' $0', $xml);
return utf8_htmlspecialchars(\s9e\TextFormatter\Utils::removeFormatting($xml));
return \s9e\TextFormatter\Utils::removeFormatting($xml);
}
/**

View File

@@ -15,6 +15,10 @@ namespace phpbb\textformatter;
/**
* Used to manipulate a parsed text
*
* In this interface, "plain text" refers to regular text as it would be inputted by a user.
* "Parsed text" refers to whichever form is returned by the implementation after parsing, which
* should be suitable to be reinserted into the database.
*/
interface utils_interface
{
@@ -73,7 +77,7 @@ interface utils_interface
* Return whether or not a parsed text represent an empty text.
*
* @param string $text Parsed text
* @return bool Tue if the original text is empty
* @return bool True if the original text is empty
*/
public function is_empty($text);
}