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

Don't use L_COLON in a JavaScript context

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 3.1.0-a3
    • Styles
    • None

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: