Issue Bug Closed

#27331htmlSpecialChars und TS-Menu-Wrap

lygie no-lastname-given 06/09/11, 17:23 updated 12/05/14, 14:19

Description

Hallo,

When I add a wrap to a TS-Menu like this

stdWrap.cObject = COA
stdWrap.cObject {
5 = TEXT
5 {
field = subtitle
wrap = |
if.isTrue.data = field:subtitle
}
}

i cannot see any possibility to get htmlSpecialChars = 0 to work. The result is, that the span tag is rendered to “<span”

I think, that happens when there is a “htmlSpecialChars.” Element, that has Child-Elements link htmlSpecialChars.preserveEntities. No matter if htmlSpecialChars.preserveEntities is set to 1 or 0.

In this case the function-Type becomes “array” after being parsed by array_intersect_key in typo3/sysext/cms/tslib/class.tslib_content.php where it should be “boolean”

If I add “if(!($functionName==“htmlSpecialChars”) || !($functionType==“array”)){” in line 2048 of typo3/sysext/cms/tslib/class.tslib_content.php everything is fine.

Is there any proper solution to this problem.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 5

  1. lygie no-lastname-given commented 06/09/11, 17:27

    Sorry for the confusion. The Bugtracker rendered my Tag, so the explanation is misleading.
    The Problem is, that
    becomes
    &lt;span &gt;
  2. Markus Klein commented 06/09/11, 20:28

    Hi!

    Where do you set htmlSpecialChars? Can you please also provide the TS for the menu around?
    Thanks.

  3. lygie no-lastname-given commented 06/10/11, 08:41

    I need the htmlSpecialChars to set a span tag within my menu

    Here is the TS-Code:

    page.includeLibs.tmenu_layers = media/scripts/tmenu_layers.php
    lib.mainmenu = HMENU
    lib.mainmenu {
      wrap = <div id="mainMenu">|</div>
      special = directory
      special.value = 1
      entryLevel = 1
      1 = TMENU_LAYERS
      1 {
        wrap = <ul class="nav">|</ul>
        layerStyle = position:absolute;VISIBILITY:hidden;width:100%;margin: 0; padding: 0; overflow:hidden;
    
        displayActiveOnLoad = 1
        displayActiveOnLoad.onlyOnLoad = 0
    
        dontHideOnMouseUp = 1
        hideMenuWhenNotOver = 50
        hideMenuTimer = 2000
    
        lockPosition = x
        blankStrEqFalse = 1
    
        relativeToParentLayer = 1
        relativeToTriggerItem = 0
    
        topOffset    = 171
        leftOffset    = 0
    
        xPosOffset = 0
    
        freezeMouseover = 1
        expAll = 1
    
        NO {
         allWrap = <li>|</li>
         stdWrap.htmlSpecialChars = 1
         stdWrap.htmlSpecialChars.preserveEntities = 1
         ATagParams = class=mainmenu
    
        }
        ACT < .NO
        ACT = 1
        ACT {
         ATagParams = class=mainmenuActive
        }
        RO < .ACT
        RO {
          freezeMouseover = 1
          ATagParams = class=mainmenuActive
        }
      }
      2 = TMENU_LAYERS
      2 {
        wrap = <div class="subMenu"><table cellspacing="0" cellpadding="0" border="0"><tr>|</tr></table></div>
        layerStyle = position:absolute;VISIBILITY:hidden;
    
        relativeToParentLayer = 1
    
        relativeToTriggerItem = 1
    
        relativeToTriggerItem.addHeight = 1
        displayActiveOnLoad = 0
        displayActiveOnLoad.onlyOnLoad = 0
    
        topOffset    = 2
    
        dontHideOnMouseUp = 0
        hideMenuWhenNotOver = 50
        hideMenuTimer = 1000
        freezeMouseover = 0
        freezeMouseover.alwaysKeep = 0
    
        setFixedWidth = 0
    
        expAll = 1
        NO {
          allWrap = <td>|</td>
           stdWrap.htmlSpecialChars = 1
           stdWrap.htmlSpecialChars.preserveEntities = 1
           ATagParams = class=submenuA
        }
    
        ACT < .NO
        ACT = 1
        ACT {
         ATagParams = class=submenuActive
        }
        RO < .ACT
        RO {
          ATagParams = class=submenuActive
        }
    
      }
      3 < .2
      3 {
        wrap = <div class="subsubMenu"><ul class="nav3">|</ul></div>
        layerStyle = position:absolute;VISIBILITY:hidden;width: auto;
        NO {
          stdWrap.htmlSpecialChars = 0
          stdWrap.cObject = COA
          stdWrap.cObject {
            5 =  TEXT
            5 {
              field = subtitle
              htmlSpecialChars = 0
              wrap = <span style="font-weight:bold;display:block;float:left;">|</span>&nbsp;-&nbsp;
              if.isTrue.data = field:subtitle
            }
            10 = TEXT
            10 {
              #wrap = <span style="padding:5px 0;">|</span>
              data = field:title
            }
          }
          allWrap = <li>|</li> 
           stdWrap.htmlSpecialChars = 0
           stdWrap.htmlSpecialChars.preserveEntities = 0
           ATagParams = class=subsubmenuA
        }
    
        ACT < .NO
        ACT = 1
        ACT {
         ATagParams = class=subsubmenuActive
        }
        RO < .ACT
        RO {
          ATagParams = class=subsubmenuActive
        }
      }
    }
  4. Alexander Opitz commented and changed status New Needs Feedback Is Regression 0 07/15/14, 16:02

    Hi,

    as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (4.5.35 or 6.2.4)?

  5. Alexander Opitz commented and changed status Needs Feedback Closed 12/05/14, 14:19

    No feedback within the last 90 days => closing this issue.

    If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.