[TYPO3-RTE] Attribute lang vs xml:lang - Problems with the former

Martin Kutschker masi-no at spam-typo3.org
Thu Sep 25 13:05:33 CEST 2008


Martin Kutschker schrieb:
> Hi!
> 
> I want to enter and save SPAN tags with a lang attribute. I thought I
> managed this once but now the RTE kills all my lang attributes. After
> digging into the code I found the place where my attribute is removed.
> I'm not sure why this happens and what is the purpose of it.
> 
> The problem is in class.t3lib_parsehtml_proc.php. In the function
> getKeepTags() is some magic that tries to clean the SPAN on the way to
> the DB. By doing so it removes the attribute lang and title.
> 
> I want to allow these attributes in future versions of TYPO3. Any
> objections?
> 
> Can I overcome this problem by TS configuration in the meantime?

The trick is to have a tags.span setting for entryHTMLparser_db AND
HTMLparser. You can probably use the same settings for both properties
but for me a simple HTMLparser_db.tags.span.allowedAttribs = lang did
the trick.

So I now try to do restrict stuff (tags and attibutes) in
entryHTMLparser_db, but have configurations that enable things (for some
reason disabled by default) in HTMLparser_db. An example is also
HTMLparser_db.noAttrib = br that will leave the attributes untouched
(otherwise there are defaults you don't like as well).

Masi


More information about the TYPO3-project-rte mailing list