Stripped backslash
-
Hi,
thank you for awesome plugin at first place!
Unfortunately I’ve encountered an issue when rendering some script code containing a backslash
\
– when plugin is applied on that page, the backslash (right after a slash in this case) is escaped. I need it will render exactly as I write it in admin area, because this script code is for web visitors and they may copy this code for their own use.The code in template is wrapped by pre > code tags and there is also applied a PHP function
htmlspecialchars()
on the output string:<pre><code><?= htmlspecialchars($content); ?></code></pre>
Example of raw script code (affected line) in admin area (see the backslash right before
$basearch
):baseurl=https://packagecloud.io/timescale/timescaledb/el/$(rpm -E %{rhel})/\$basearch
The result on page (the backslash is stripped):
baseurl=https://packagecloud.io/timescale/timescaledb/el/$(rpm -E %{rhel})/$basearch
I decided to exclude this page from cache, but there are more pages using backslash and I want to cache these pages too ??
Thank you,
Best regards.
- The topic ‘Stripped backslash’ is closed to new replies.