Review TYPO3_4-5 Abandoned

9128[BUGFIX] Encode link text properly in typolink

Helmut Hummel CR 0 V 0 Easy +11 −8 updated 06/03/13, 20:49

Commit message

If the to be linked text is empty choses an appropriate link text
but does not encode it properly.

Encode the automatically chosen link texts with htmlspecialchars()

Review

  • Code review CR 0
  • Verified V 0

Files 1

Review log 8

  1. Susi Moog commented on patch set 2 03/13/12, 18:19

    Where do you want to implement the property? Something like typolink.parameter.defaultLinktext.htmlspecialchars looks ugly but would be correctly named. In doubt I'd be for "breaking" backwards compatibility here, as the whole feature is not really documented anywhere.
  2. Helmut Hummel commented on patch set 2 03/13/12, 18:19

    Verified; Looks good to me, but someone else must approve
    add the missing "typolink" here once the rest is approved
  3. Helmut Hummel commented on patch set 2 03/13/12, 18:19

    No score; No score Hm, breaking BC means encoding the output properly? A TypoScript property cannot be implemented, as entering the following in a RTE field <link 5></link> Will also generate a link with the linked page title. So we would need something like: config.typolinkEncodeDefaultText = 1 or config.typolinkDoNotEncodeDefaultText = 0 ;) Page titles like "<b>My bold page</b>" are "broken" in any case when using the currently shipped TypoScript. Nevertheless I agree with your concerns, but I think we need a solution here. Any idea how to proceed?
  4. Helmut Hummel uploaded patch set 2 03/13/12, 18:19

  5. Steffen Gebert commented on patch set 2 03/13/12, 18:19

    I would prefer that you didn't submit this I see a problem with backward compatibility. I know editors, who use navigation titles like <b>News</b>. What about implementing the htmlSpecialChars option with a default of 1, which can be disabled, if the admin is daring? Why do you start with 4.5 and not master?
  6. Jigal van Hemert commented on patch set 2 03/13/12, 18:19

    Verified; Looks good to me, but someone else must approve Exactly what was needed in typolink().
  7. Wouter Wolters commented on patch set 2 03/13/12, 18:19

    Looks good to me, but someone else must approve
  8. Helmut Hummel commented on patch set 2 03/13/12, 18:19

    Abandoned