protected function Html::encodeIdSafeBase64

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\Format

Code

protected function encodeIdSafeBase64($data) {

  // Prefix with a b to enforce that the first character is a letter.
  return 'b' . rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
}