Example #1
0
 /**
  * Replace "<!--LINK-->" link placeholders with plain text of links
  * (not HTML-formatted).
  *
  * @param $text String
  * @return String
  */
 function replaceLinkHoldersText($text)
 {
     return $this->mLinkHolders->replaceText($text);
 }
Example #2
0
 /**
  * @param string $caption
  * @param LinkHolderArray|bool $holders
  * @return mixed|string
  */
 protected function stripAltText($caption, $holders)
 {
     # Strip bad stuff out of the title (tooltip).  We can't just use
     # replaceLinkHoldersText() here, because if this function is called
     # from replaceInternalLinks2(), mLinkHolders won't be up-to-date.
     if ($holders) {
         $tooltip = $holders->replaceText($caption);
     } else {
         $tooltip = $this->replaceLinkHoldersText($caption);
     }
     # make sure there are no placeholders in thumbnail attributes
     # that are later expanded to html- so expand them now and
     # remove the tags
     $tooltip = $this->mStripState->unstripBoth($tooltip);
     $tooltip = Sanitizer::stripAllTags($tooltip);
     return $tooltip;
 }