is the page part's filter status available to a tag in an extension
called from that page part?
On May 19, 2007, at 11:52 AM, David Minor wrote:
> I ran into a problem yesterday with the enkodertags extension not
> displaying properly and I meant to post to the list, but instead I
> inadvertently emailed Sean Santry directly. He was quick to help and
> pointed out that the textile filter was probably endcoding the html
> created by the tag. I wanted to share my solution here and ask a
> question to further both my knowledge of radiant's structure and
> offer a fix for Sean's extension. I'll post my email with Sean in
> it's entirety below.
>
> The fix as of now is to wrap the enkoder tag with
> <notextile><r:enkoder_mailto ... /></notextile> in my page part.
> What immediately jumped out at me is that enkodertags should be
> looking for the textile filter and adding the <notextile> tags
> itself. it would happen at the very end of the enkode_it method just
> before the result is passed back. The question is, what to check
> for? Can I check for the filter type of the page part or snippet
> from within the Enkoder object?
>
> Here's the original post that should have come to the list. Thanks
> for the help Sean.
>
>> Hi David,
>>
>> Are you using the Textile filter on the on the page or in the
>> snippet where you'ure using the enkode_mailto tag? If so, it seems
>> that filter gets applied after the enkode_mailto (and other tags),
>> so the HTML markup generated in the tag will get encoded as you
>> describe.
>>
>> I'll look into a workaround, and am open to suggestions if you have
>> them.
>>
>> - Sean
>>
>>
>>> The output of enkode_mailto tag is outputting incorrectly for me.
>>>
>>> <r:enkode_mailto email="[EMAIL PROTECTED]" link_text="email" />
>>>
>>> gives
>>>
>>> <script type="text/javascript">
>>>
>>> /* <![CDATA[ <strong>/
>>> function hivelogic_enkoder(){var kode=
>>> “kode=\”oked\\\”=);’‘):-1thnglee.od
>>> (kAtarche.od?kthnglee.od<k(ix+e=od}ki)t(“+
>>> “rAha.cdeko)<ins>+1(iAtarche.od=kx</ins>){=2i+);-1thnglee.od
>>> (ki<0;i=r(fo’;=’;x\\\”\\”+
>>> ”\\;)’’:)1-htgnel.edok(tArahc.edok?htgnel.edok<i
>>> (<ins>x=edok})i(tArahc.edok</ins>)1+”+
>>> “i(tArahc.edok=<ins>x{)2=+i;)1-htgnel.edok(<i;0=i(rof;''=x;\\
>>> \\=\\\\\\\"d\\\\kx"</ins>
>>> “)e(od}CcaeCoorfhgmirt.=nxr8S1+<ins>;)2<=(ci03c)f(;A-
>>> diCtaecoeroh=.{d+kich)g+e;”</ins>
>>> ”.tdnklie0oi<r;f='(=o;;,'\\\\x\\\\\\\\\\\\\\\\\\\\\\\"</
>>> strong>\\\\<ins><strong>lqmr,1h+uvyhuh”</ins>
>>> ”,1</strong><strong>[EMAIL PROTECTED]>[EMAIL PROTECTED]
>>> zo.kB(&gxnlkbCs([EMAIL PROTECTED]:y”+
>>> “t4zk(bz&zokrbCb(D(skogBrg5(DA/_%{></
>>> strong>@><strong>[EMAIL PROTECTED]>3?
>>> lrnhgo1qhwj>k.l,[EMAIL PROTECTED]”+
>>> “udrFhgwDl+0,>6ilf+3?f,@.54>;[EMAIL PROTECTED],
>>> \\\\0\\\\\\\\\\\\\\”+
>>> ”[EMAIL PROTECTED]@n%=h\\\\r\\\\\\\\\\\\\\\\\\\\\\
>>> \”e\\\\od=k\\\”\\\\”+
>>> ”\\\\\\\\edok\\\”\\\\e=od\\
>>> \”kk;do=eokeds.lpti’()’r.verees)(j.io
>>> (n’‘)\”;x=’”+
>>> ”’;for(i=0;i<(kode.length-1);i+=2){x+=kode.charAt(i
>>> +1)<ins>kode.charAt(i)}kode=”</ins>
>>> “x+(i<kode.length?kode.charAt
>>> (kode.length-1):’‘);”
>>> ;var i,c,x;while(eval(kode));}hivelogic_enkoder();
>>> /</strong> ]]> */
>>>
>>> </script>
>>>
>>> The biggest problem I see is the tag brackets are being written
>>> out </>. I'm expecting there are other places where
>>> entities are being used when they shouldn't be. Any thoughts?
>>>
>>> dm
>>>
>>
>
> _______________________________________________
> Radiant mailing list
> Post: [email protected]
> Search: http://radiantcms.org/mailing-list/search/
> Site: http://lists.radiantcms.org/mailman/listinfo/radiant
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant