You are here

public function TranslatorPluginBase::unescapeText in Translation Management Tool 8

Removes escape patterns from an escaped text.

Parameters

string $text: The text from which escape patterns should be removed.

Return value

string The unescaped text.

Overrides TranslatorPluginInterface::unescapeText

File

src/TranslatorPluginBase.php, line 167

Class

TranslatorPluginBase
Default controller class for service plugins.

Namespace

Drupal\tmgmt

Code

public function unescapeText($text) {
  return preg_replace('/' . preg_quote($this->escapeStart, '/') . '(.+)' . preg_quote($this->escapeEnd, '/') . '/U', '$1', $text);
}