bricebou / grav-plugin-better-typography

MIT License
2 stars 0 forks source link

It breaks some html tags #4

Open u07 opened 1 year ago

u07 commented 1 year ago

Hi! I noticed, that my scripts stopped working. Cause this:

# This is markdown with html

<script type="text/javascript">
    function(w,d,c){var s=d.createElement('script')}
</script>

becomes:

<h1>This is markdown with html</h1>

  <script type="text/javascript">
  function(w,d,c){var s=d.createElement(”script”)}
  </script>

With fancy quotes inside script tag: ”script”

u07 commented 1 year ago

And it took time to understand, why this got broken:

<style> #search-desktop { display: none; } </style>

image

u07 commented 1 year ago

Okay, I see. You don't call $PHPTypoSettings->set_defaults(); so php-typography stays out of fine-tune.

I would recommend adding this to better-typography.php, line 131:

        $PHPTypoSettings->set_tags_to_ignore();
        $PHPTypoSettings->set_classes_to_ignore();
        $PHPTypoSettings->set_ids_to_ignore();

image

bricebou commented 1 year ago

Hi, Thanks for reporting this issue !

I'm currently following a dev course and I'm planning on reviewing this plugin soon ! I'll see if I can do a better work :-)

u07 commented 1 year ago

It is already a very helping thing) Thanks for your work