[TYPO3-core] FYI: Fixed bug #6420: access key generation wrong with HTML tags in menu titles (TMENU)

Martin Kutschker martin.kutschker-n0spam at no5pam-blackbox.net
Mon Oct 8 22:52:07 CEST 2007


Hi!

Problem: a TMENUITEM can contain markup in its title like this

     1 = HMENU
     1 {
         accessKeys = 1
         1 = TMENU
         1 {
             expAll = 1
             NO {
                 field = title
                 ATagTitle.field = abstract // description // title
                 stdWrap.wrap = <span class="menutext">|</span>
                 allWrap = <li class="firstlevel">|
             }
...


In this case the access key would start with S from span and go on with 
that.

Solution: use strip_tags() before calculating the access key.

Notes: I have moved the wrongly applied trim(), which was used on a 
return value of substr(), around strip_tags. And I have changed the 
preg_match to use only A-Z because of the strtoupper().

Attention: I have (trunk only) added the key to the result array to be 
of use for the IProcFunc.

Branches: trunk, TYPO3_4-1

Masi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: accessKey.diff
Type: text/x-diff
Size: 897 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20071008/b0dec09f/attachment.diff 


More information about the TYPO3-team-core mailing list