Skip to:
Content

bbPress.org

Opened 11 years ago

Closed 11 years ago

Last modified 6 years ago

#2558 closed defect (bug) (fixed)

Conversion issues SMF to bbPress

Reported by: mspecht's profile mspecht Owned by:
Milestone: 2.6 Priority: normal
Severity: normal Version: 2.5.3
Component: API - Importers Keywords: has-patch
Cc:

Description

There are two minor issues with the SMF.php importer. &nbsp; and <br> are not being converted correctly.

Lines 722 - 728 instead of :

		// Replace '<br />' with ''
		$SMF_markup = preg_replace( '/\<br \/\>/',   '<tt>',  $SMF_markup );

		// Replace '[size=$1]' with '<span style="font-size:$1%;">$3</span>'
		$SMF_markup = preg_replace( '/\[size=(.*?)\]/', '<span style="font-size:$1">', $SMF_markup );
		// Replace '[/size]' with '</span>'
		$SMF_markup = preg_replace( '/\[\/size\]/',     '</span>',  $SMF_markup );


Needs to be something like:

		// Replace '<br />' with ''
		$SMF_markup = preg_replace( '/\<br \/\>/',   '<br>',  $SMF_markup );

		// Replace '[size=$1]' with '<span style="font-size:$1%;">$3</span>'
		$SMF_markup = preg_replace( '/\[size=(.*?)\]/', '<span style="font-size:$1">', $SMF_markup );
		// Replace '[/size]' with '</span>'
		$SMF_markup = preg_replace( '/\[\/size\]/',     '</span>', $SMF_markup );

		// Replace '&nbsp;' with ' '
		$SMF_markup = preg_replace ( '/&nbsp;/', ' ', $SMF_markup );

Attachments (1)

2558.diff (2.6 KB) - added by netweb 11 years ago.

Download all attachments as: .zip

Change History (5)

@netweb
11 years ago

#1 @netweb
11 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 2.6

Thanks for this, let me know if you find any others and we'll ship this as part of 2.6

#2 @netweb
11 years ago

  • Resolution set to fixed
  • Status changed from new to closed

In r5332:

SMF Importer BBCode regex expressions

  • Fix copy pasta <br>/<tt> regex
  • Add non-break space &nbsp; to space rexex
  • Props mspecht. Fixes #2558

#3 @johnjamesjacoby
8 years ago

In 6476:

Converters: Port r5332 to 2.5 branch.

See #2558, #3112.

#4 @johnjamesjacoby
6 years ago

Assigning all closed & unassigned tickets in the 2.6 milestone to myself.

Note: See TracTickets for help on using tickets.