Skip to:
Content

bbPress.org

Changeset 5332


Ignore:
Timestamp:
04/01/2014 08:27:59 AM (6 years ago)
Author:
netweb
Message:

SMF Importer BBCode regex expressions

  • Fix copy pasta <br>/<tt> regex
  • Add non-break space &nbsp; to space rexex

Props mspecht. Fixes @2558

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/converters/SMF.php

    r5191 r5332  
    720720        $SMF_markup = preg_replace( '/\[\/tt\]/', '</tt>', $SMF_markup );
    721721
    722         // Replace '<br />' with ''
    723         $SMF_markup = preg_replace( '/\<br \/\>/',   '<tt>', $SMF_markup );
     722        // Replace '<br />' with '<br>'
     723        $SMF_markup = preg_replace( '/\<br \/\>/', '<br>', $SMF_markup );
    724724
    725725        // Replace '[size=$1]' with '<span style="font-size:$1%;">$3</span>'
     
    727727        // Replace '[/size]' with '</span>'
    728728        $SMF_markup = preg_replace( '/\[\/size\]/',     '</span>',                     $SMF_markup );
     729
     730        // Replace non-break space '&nbsp;' with space ' '
     731        $SMF_markup = preg_replace ( '/&nbsp;/', ' ', $SMF_markup );
    729732
    730733        // Now that SMF custom HTML has been stripped put the cleaned HTML back in $field
Note: See TracChangeset for help on using the changeset viewer.