Hey Aaron,
I just wanted to confirm that the Escape tag only works on ExpressionEngine tags and not plain text. I’m using EE 2.7.3 and CE Cache 1.10.1. I’ve setup a fresh template with the following code:
{exp:ce_cache:it id="test" seconds="0" drivers="file"} Here is some cached text.<br/>
{exp:ce_cache:escape:pre}
{test}<br/> hopefully escaped text.
{/exp:ce_cache:escape:pre}
{/exp:ce_cache:it}
‘{test}’ is a snippet. If I changed the value of the snippet, it is escaped as predicted. If I change the value of the plain text within the Escape tag, it serves the originally cached text instead of the updated text. I tried this with both the standard cache tags and the pre-escaped tags (as shown above). There was no change in regards to the plain text being escaped.
I came across this because I was trying to escape a link to a css file that changes quite frequently. I figured it would be easier to just escape that part of the template than recache all of the pages it exists on whenever I make a change.
I realize I could just place the link to that css file in a global variable and it will escape as it should (which is actually probably what I’ll end up doing). I just wanted to:
1) confirm this is expected behavior
2) request a possible addition to the documentation that notes this (unless I missed it, then apologies)
Assuming this is expected behavior, I’m not sure if it’s worth making a feature request for. I don’t know how often others will want to escape plain text in an EE template, doubt it comes up much.
Thanks,
Earl
|