• Resolved rag10

    (@rag10)


    When the excludeheading setting is enabled, PrettyLink uses the /e modifier of the preg_replace function. As this modifier has been deprecated since PHP version 5.5.0 and removed in 7.0.0, all instances where the modifier is used, should be replaced with the preg_replace_callback function.

    I.e.
    $text = preg_replace('%(<h.*?>)(.*?)(</h.*?>)%sie', "'$1'.insertspecialchars('$2').'$3'", $text);

    should be replaced by something like

    $text = preg_replace_callback('%(<h.*?>)(.*?)(</h.*?>)%si', function($matches) {
        return $matches[1] . insertspecialchars($matches[2]) . $matches[3];
    }, $text);
    
Viewing 1 replies (of 1 total)
  • Plugin Author cartpauj

    (@cartpauj)

    Can you point me to a file and line number where Pretty Link is using the /e modifier? Before I mention this to the developer, I need to be able to prove it’s a problem. But I cannot find anywhere that we’re using the /e modifier in our regex.

Viewing 1 replies (of 1 total)

The topic ‘preg_replace /e modifier’ is closed to new replies.