Line 207 | Line 207 |
---|
* Modify the s9e\TextFormatter configurator before the default settings are set * * @event core.text_formatter_s9e_configure_before
|
* Modify the s9e\TextFormatter configurator before the default settings are set * * @event core.text_formatter_s9e_configure_before
|
* @var \s9e\TextFormatter\Configurator configurator Configurator instance
| * @var Configurator configurator Configurator instance
|
* @since 3.2.0-a1 */ $vars = array('configurator');
| * @since 3.2.0-a1 */ $vars = array('configurator');
|
Line 218 | Line 218 |
---|
{ $configurator->urlConfig->disallowScheme($scheme); }
|
{ $configurator->urlConfig->disallowScheme($scheme); }
|
foreach (explode(',', $this->config['allowed_schemes_links']) as $scheme)
| foreach (array_filter(explode(',', $this->config['allowed_schemes_links'])) as $scheme)
|
{ $configurator->urlConfig->allowScheme(trim($scheme)); }
| { $configurator->urlConfig->allowScheme(trim($scheme)); }
|
Line 273 | Line 273 |
---|
->add('#imageurl', __NAMESPACE__ . '\\parser::filter_img_url') ->addParameterByName('urlConfig') ->addParameterByName('logger')
|
->add('#imageurl', __NAMESPACE__ . '\\parser::filter_img_url') ->addParameterByName('urlConfig') ->addParameterByName('logger')
|
->addParameterByName('max_img_height') ->addParameterByName('max_img_width')
| |
->markAsSafeAsURL() ->setJS('UrlFilter.filter');
| ->markAsSafeAsURL() ->setJS('UrlFilter.filter');
|
Line 358 | Line 356 |
---|
$tag = $configurator->Emoji->getTag(); $tag->template = '<xsl:choose> <xsl:when test="@tseq">
|
$tag = $configurator->Emoji->getTag(); $tag->template = '<xsl:choose> <xsl:when test="@tseq">
|
<img alt="{.}" class="emoji" draggable="false" src="//twemoji.maxcdn.com/2/svg/{@tseq}.svg"/>
| <img alt="{.}" class="emoji" draggable="false" src="//cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/{@tseq}.svg"/>
|
</xsl:when> <xsl:otherwise>
|
</xsl:when> <xsl:otherwise>
|
<img alt="{.}" class="emoji" draggable="false" src="https://cdn.jsdelivr.net/gh/s9e/[email protected]/dist/svgz/{@seq}.svgz"/>
| <img alt="{.}" class="emoji" draggable="false" src="//cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/{@seq}.svg"/>
|
</xsl:otherwise> </xsl:choose>'; $tag->template = '<xsl:choose><xsl:when test="$S_VIEWSMILIES">' . str_replace('class="emoji"', 'class="emoji smilies"', $tag->template) . '</xsl:when><xsl:otherwise><xsl:value-of select="."/></xsl:otherwise></xsl:choose>';
| </xsl:otherwise> </xsl:choose>'; $tag->template = '<xsl:choose><xsl:when test="$S_VIEWSMILIES">' . str_replace('class="emoji"', 'class="emoji smilies"', $tag->template) . '</xsl:when><xsl:otherwise><xsl:value-of select="."/></xsl:otherwise></xsl:choose>';
|
Line 370 | Line 368 |
---|
* Modify the s9e\TextFormatter configurator after the default settings are set * * @event core.text_formatter_s9e_configure_after
|
* Modify the s9e\TextFormatter configurator after the default settings are set * * @event core.text_formatter_s9e_configure_after
|
* @var \s9e\TextFormatter\Configurator configurator Configurator instance
| * @var Configurator configurator Configurator instance
|
* @since 3.2.0-a1 */ $vars = array('configurator');
| * @since 3.2.0-a1 */ $vars = array('configurator');
|
Line 448 | Line 446 |
---|
/** * Configure the Autolink / Autoemail plugins used to linkify text *
|
/** * Configure the Autolink / Autoemail plugins used to linkify text *
|
* @param \s9e\TextFormatter\Configurator $configurator
| * @param Configurator $configurator
|
* @return void */ protected function configure_autolink(Configurator $configurator)
| * @return void */ protected function configure_autolink(Configurator $configurator)
|
Line 470 | Line 468 |
---|
$tag->attributes->add('text'); $tag->template = '<xsl:value-of select="@text"/>';
|
$tag->attributes->add('text'); $tag->template = '<xsl:value-of select="@text"/>';
|
| $board_url = generate_board_url() . '/'; $tag->filterChain ->add(array($this->link_helper, 'truncate_local_url')) ->resetParameters() ->addParameterByName('tag') ->addParameterByValue($board_url);
|
$tag->filterChain ->add(array($this->link_helper, 'truncate_local_url')) ->resetParameters() ->addParameterByName('tag')
|
$tag->filterChain ->add(array($this->link_helper, 'truncate_local_url')) ->resetParameters() ->addParameterByName('tag')
|
->addParameterByValue(generate_board_url() . '/');
| ->addParameterByValue(preg_replace('(^\\w+:)', '', $board_url));
|
$tag->filterChain ->add(array($this->link_helper, 'truncate_text')) ->resetParameters()
| $tag->filterChain ->add(array($this->link_helper, 'truncate_text')) ->resetParameters()
|