You are here

public function TMGMTDefaultTranslatorPluginController::unescapeText in Translation Management Tool 7

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 TMGMTTranslatorPluginControllerInterface::unescapeText

File

plugin/tmgmt.plugin.translator.inc, line 242
Contains the abstract translator base plugin class.

Class

TMGMTDefaultTranslatorPluginController
Default controller class for service plugins.

Code

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