sal0max / grav-plugin-shortcode-gallery-plusplus

A Shortcode extension to add sweet galleries with a lightbox to your Grav website.
MIT License
33 stars 8 forks source link

Checking for <pre> breaks page #4

Closed ncadigan closed 3 years ago

ncadigan commented 3 years ago

commit 20de20970645f5fa6adcfa512ac6fd57bebea758 "Improved image parsing"

Below code breaks page

// check validity if (str_contains($content, "<pre>")) return "<p style='color: #d40000; font-weight: bold; padding: 1rem 0;'>[Shortcode Gallery++] Error:<br> &gt; Images provided got parsed as code block.<br> &gt; Please check your markdown file and make sure the images aren't indented by tab or more than three spaces.</p>";

Used example code in readme (switching out for my images). There is no \<pre> anywhere on the page.

Error: Call to undefined function Grav\Plugin\Shortcodes\str_contains() References line 45

Removing the check validity makes it work fine.

sal0max commented 3 years ago

Thanks for the bug report.

However, this is a duplicate of #3 It's already fixed in Version 1.0.3