You are here

private function GlossifyBase::sanitizeTip in Glossify 8

Cleanup and truncate tip text.

1 call to GlossifyBase::sanitizeTip()
GlossifyBase::parseTooltipMatch in src/GlossifyBase.php
Convert terms in text to links.

File

src/GlossifyBase.php, line 181

Class

GlossifyBase
Base implementation of tooltip filter type plugin.

Namespace

Drupal\glossify

Code

private function sanitizeTip($tip) {

  // Get rid of HTML.
  $tip = strip_tags($tip);

  // Maximise tooltip text length.
  $tip = Unicode::truncate($tip, 300, TRUE, TRUE);
  return $tip;
}