+ * @return string HTML Output of the Smilie
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ */
+ public static function replace($s, $no_images = false)
+ {
+ $smilies = self::getList();
+
+ $s = self::replaceFromArray($s, $smilies, $no_images);
+
+ return $s;
+ }
+
+ /**
+ * Replaces emoji shortcodes in a string from a structured array of searches and replaces.
+ *
+ * Depends on system.no_smilies config value, skips <pre> and <code> tags.
+ *
+ * @param string $text An HTML string
+ * @param array $smilies An string replacement array with the following structure: ['texts' => [], 'icons' => []]
+ * @param bool $no_images Only replace shortcodes without image replacement (e.g. Unicode characters)
+ * @return string
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException