protected function Html::encodeIdSafeBase64 in Translation Management Tool 8
Returns base64 encoded data that is safe for use in xml ids.
File
- translators/
tmgmt_file/ src/ Plugin/ tmgmt_file/ Format/ Html.php, line 24
Class
- Html
- Export into HTML.
Namespace
Drupal\tmgmt_file\Plugin\tmgmt_file\FormatCode
protected function encodeIdSafeBase64($data) {
// Prefix with a b to enforce that the first character is a letter.
return 'b' . rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
}