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

Refactor custom bbcodes to not use /e modifier in regex

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.2.0
    • 3.2.0-dev
    • BBCode Engine
    • None

      The current custom bbcode system that is used in acp_bbcodes and the message parser uses the /e modifier with preg_replace. This is no longer supported in PHP7.

      Since the regex for the custom bbcodes is generated and saved in the database, one cannot simply use anonymous functions for getting rid of the /e modifier. We'll have to modify the creation of the regex to run upon parsing the code instead of while creating the bbcode. Only then we'll be able to replace the occurences of the /e modifier with preg_replace_callback().

      We might want to use a token based system for that.

            nicofuma nicofuma
            Marc Marc
            Votes:
            4 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: