Skip to:
Content

bbPress.org

Ticket #2194: 2194.2.diff

File 2194.2.diff, 811 bytes (added by netweb, 8 years ago)

regex now matches 'new line' ->   -> 'carriage return'

  • includes/admin/converters/SimplePress5.php

    diff --git a/includes/admin/converters/SimplePress5.php b/includes/admin/converters/SimplePress5.php
    index f20eb8b..1b1c7c4 100644
    a b class SimplePress5 extends BBP_Converter_Base { 
    524524                // Replace '<strong>username said </strong>' with '@username said:'
    525525                $simplepress_markup = preg_replace ( '/\<strong\>(.*?)\ said\ \<\/strong\>/',     '@$1 said:',        $simplepress_markup );
    526526
     527                // Replace '<p>&nbsp;</p>' with '<p>&nbsp;</p>'
     528                $simplepress_markup = preg_replace ( '/\n(&nbsp;|[\s\p{Z}\xA0\x{00A0}]+)\r/', '<br>', $simplepress_markup );
     529
    527530                // Now that SimplePress' custom HTML codes have been stripped put the cleaned HTML back in $field
    528531                $field = $simplepress_markup;
    529532