[kupu-dev] Avoid filtering of specific attribute

Max M maxm at mxm.dk
Thu Oct 4 13:00:06 CEST 2007


Wouter Vanden Hove skrev:
> Max M wrote:
> 
>> Duncan Booth skrev:
>>
>>> includeTagAttributes('span', 'dynafield:view')
>>>
>>> But I'm not sure that will work or if the unexpected namespace might
>>> cause problems.
>> Turned out that I was close all the time:
>>
>> editor.xhtmlvalid.setTagAttributes(['div','span']
> ['dynafield:uid','dynafield:view']);
>> editor.xhtmlvalid.setAttrFilter(['dynafield:uid']);
>> editor.xhtmlvalid.setAttrFilter(['dynafield:view']);
> 
> This is the working solution?

Not really. Turned out that Duncan was right. That way it only allows 
those two attributes in divs and spans. So something like the class 
would be filtered out :-s


> I have a very similar use-case, trying to get ZPTField working with kupu to
> enable tags like this:
> <span  tal:replace="here/title"> title </span>
> 
> what is the best way get disable the filtering for this?
> edit kupucontentfilters.js or kupuinit.js?

I will let you know when I find out :-)


-- 

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science



More information about the kupu-dev mailing list