jpamental / typogrify

Drupal 8 port of the Typogrify module
GNU General Public License v2.0
3 stars 4 forks source link

Fix text sanitization. #8

Open benjifisher opened 8 years ago

benjifisher commented 8 years ago

When building the settings form, there are lines like

    foreach (unicode_conversion_map('ligature') as $ascii => $unicode) {
      $ligature_options[$ascii] = t('Convert <code>@ascii</code> to !unicode', array(
        '@ascii' => $ascii,
        '!unicode' => $unicode,
      ));
    }

In D7, the ! token means "do not sanitize this: I have already checked that it is safe." In D8, it is illegal. It sort of works, but it generates PHP warnings.

I am not sure what the proper fix is. There are a lot of ! tokens in this file. We may need different fixes for different uses.