Lines Matching defs:text

702  * returns true if the text contains any bad words
720 * @param string $text - optional text to check, if not given the globals are used
723 function checkwordblock($text = '')
736 if (!$text) $text = "$PRE $TEXT $SUF $SUM";
738 // we prepare the text a tiny bit to prevent spammers circumventing URL checks
740 $text = preg_replace(
743 $text
761 if (count($re) && preg_match('#(' . implode('|', $re) . ')#si', $text, $matches)) {
1000 * also makes sure the given text is valid UTF-8
1005 * @param string $text
1008 function cleanText($text)
1010 $text = preg_replace("/(\015\012)|(\015)/", "\012", $text);
1012 // if the text is not valid UTF-8 we simply assume latin1
1015 if (!Clean::isUtf8($text)) $text = utf8_encode($text);
1017 return $text;
1021 * Prepares text for print in Webforms by encoding special chars.
1028 * @param string $text
1031 function formText($text)
1033 $text = str_replace("\012", "\015\012", $text ?? '');
1034 return htmlspecialchars($text);
1038 * Returns the specified local text in raw format
1083 'tpl' => '', // the text used as template
1084 'tplfile' => '', // the file above text was/should be loaded from
1133 * @var string $tpl the text used as template
1134 * @var string $tplfile the file above text was/should be loaded from
1135 * @var bool $doreplace should wildcard replacements be done on the text?
1217 $text = io_readWikiPage(wikiFN($id, $rev), $id, $rev);
1223 $to = $to ? $to - 1 : (strlen($text));
1226 $slices[0] = substr($text, 0, $from);
1227 $slices[1] = substr($text, $from, $to - $from);
1228 $slices[2] = substr($text, $to);
1233 * Joins wiki text slices
1235 * function to join the text slices.
1242 * @param string $text text in the middle
1247 function con($pre, $text, $suf, $pretty = false)
1252 !str_starts_with($text, "\n")
1257 $suf !== '' && !str_ends_with($text, "\n") &&
1260 $text .= "\n";
1264 return $pre . $text . $suf;
1292 * @param string $text wikitext being saved
1293 * @param string $summary summary of text update
1296 function saveWikiText($id, $text, $summary, $minor = false)
1300 $data = (new PageFile($id))->saveWikiText($text, $summary, $minor);
1639 * @param bool $textonly true returns only plain text, true allows returning html
1640 * @return string html or plain text(not escaped) of formatted user name
1653 * @param bool $textonly true returns only plain text, true allows returning html
1654 * @return string html or plain text(not escaped) of formatted user name
1899 * @param string $exc The text of the raised exception
1999 * Strips source mapping declarations from given text #601
2001 * @param string &$text reference to the CSS or JavaScript code to clean
2003 function stripsourcemaps(&$text)
2005 $text = preg_replace('/^(\/\/|\/\*)[@#]\s+sourceMappingURL=.*?(\*\/)?$/im', '\\1\\2', $text);