Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-12028

Don't use L_COLON in a JavaScript context

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.1.0-a3
    • None
    • Styles
    • None

      posting_buttons.html has a block that adds custom BBCodes to an object. It goes like this:

      var help_line = {
      	b: '{LA_BBCODE_B_HELP}',
      	<!-- BEGIN custom_tags -->
      	,cb_{custom_tags.BBCODE_ID}{L_COLON} '{custom_tags.A_BBCODE_HELPLINE}'
      	<!-- END custom_tags -->
      }
      

      It works fine as long as L_COLON is an ASCII colon U+003A, but if a translator were to define L_COLON as a fullwidth colon U+FF1A it would break the JavaScript. In this example,

      {L_COLON}

      should be replaced with a literal ASCII colon.

            EXreaction EXreaction [X] (Inactive)
            JoshyPHP JoshyPHP
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: