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">
>>>
>>> /* &lt;![CDATA[ <strong>/
>>> function hivelogic_enkoder(){var kode=
>>> &#8220;kode=\&#8221;oked\\\&#8221;=);&#8217;&#8216;):-1thnglee.od
>>> (kAtarche.od?kthnglee.od&lt;k(ix+e=od}ki)t(&#8220;+
>>> &#8220;rAha.cdeko)<ins>+1(iAtarche.od=kx</ins>){=2i+);-1thnglee.od
>>> (ki&lt;0;i=r(fo&#8217;;=&#8217;;x\\\&#8221;\\&#8221;+
>>> &#8221;\\;)&#8217;&#8217;:)1-htgnel.edok(tArahc.edok?htgnel.edok<i
>>> (<ins>x=edok})i(tArahc.edok</ins>)1+&#8221;+
>>> &#8220;i(tArahc.edok=<ins>x{)2=+i;)1-htgnel.edok(<i;0=i(rof;''=x;\\
>>> \\=\\\\\\\"d\\\\kx"</ins>
>>> &#8220;)e(od}CcaeCoorfhgmirt.=nxr8S1+<ins>;)2&lt;=(ci03c)f(;A-
>>> diCtaecoeroh=.{d+kich)g+e;&#8221;</ins>
>>> &#8221;.tdnklie0oi<r;f='(=o;;,'\\\\x\\\\\\\\\\\\\\\\\\\\\\\"</
>>> strong>\\\\<ins><strong>lqmr,1h+uvyhuh&#8221;</ins>
>>> &#8221;,1</strong><strong>[EMAIL PROTECTED]&gt;[EMAIL PROTECTED]
>>> zo.kB(&#38;gxnlkbCs([EMAIL PROTECTED]:y&#8221;+
>>> &#8220;t4zk(bz&#38;zokrbCb(D(skogBrg5(DA/_%{&gt;</
>>> strong>@&gt;<strong>[EMAIL PROTECTED]&gt;3?
>>> lrnhgo1qhwj&gt;k.l,[EMAIL PROTECTED]&#8221;+
>>> &#8220;udrFhgwDl+0,&gt;6ilf+3?f,@.54&gt;;[EMAIL PROTECTED],
>>> \\\\0\\\\\\\\\\\\\\&#8221;+
>>> &#8221;[EMAIL PROTECTED]@n%=h\\\\r\\\\\\\\\\\\\\\\\\\\\\
>>> \&#8221;e\\\\od=k\\\&#8221;\\\\&#8221;+
>>> &#8221;\\\\\\\\edok\\\&#8221;\\\\e=od\\
>>> \&#8221;kk;do=eokeds.lpti&#8217;()&#8217;r.verees)(j.io
>>> (n&#8217;&#8216;)\&#8221;;x=&#8217;&#8221;+
>>> &#8221;&#8217;;for(i=0;i&lt;(kode.length-1);i+=2){x+=kode.charAt(i
>>> +1)<ins>kode.charAt(i)}kode=&#8221;</ins>
>>> &#8220;x+(i&lt;kode.length?kode.charAt
>>> (kode.length-1):&#8217;&#8216;);&#8221;
>>> ;var i,c,x;while(eval(kode));}hivelogic_enkoder();
>>> /</strong> ]]&gt; */
>>>
>>> </script>
>>>
>>> The biggest problem I see is the tag brackets are being written
>>> out &lt;/&gt;.  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

Reply via email to