Skip to:
Content

bbPress.org

Opened 13 years ago

Closed 12 years ago

Last modified 11 years ago

#1932 closed defect (bug) (duplicate)

Anchors that include URL's w/ other text & spaces get formatted incorrectly

Reported by: netweb's profile netweb Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.1
Component: General - Content Creation Keywords:
Cc:

Description (last modified by johnjamesjacoby)

If an anchor's text begins with 'http://' and includes whitespace bbPress rendering output is invalid.

Example:

<a href="http://forums.whirlpool.net.au/forum-replies.cfm?t=1171893">http://forums.whirlpool.net.au/forum-re ... ?t=1171893</a>
<a href="http://example.com">http://example.com http with title html whitespace</a>

bbPress HTML Current Output:

http://forums.whirlpool.net.au/forum-re ... ?t=1171893

http://example.com http with title html whitespace

bbPress HTML Expected Output:

http://forums.whirlpool.net.au/forum-re ... ?t=1171893

http://example.com http with title html whitespace whitespace

If you use the same code in a standard WordPress POST all HTML rendering/output IS correct, this is only a bbPress issue.

Hat Tip @capsx for finding this

Change History (7)

#1 @netweb
13 years ago

  • Milestone changed from Awaiting Review to 2.1.3

#2 @johnjamesjacoby
12 years ago

  • Milestone changed from 2.1.3 to 2.2

Confirmed, but it's probably important to note that WordPress comments exhibit this same behavior.

Moving to 2.2, since it's indicative of a larger issue, and won't be fixed in the short term for 2.1.3.

#3 @netweb
12 years ago

Related info:

http://core.trac.wordpress.org/browser/tests/trunk/tests/formatting/MakeClickable.php#L308

'Some text with a link <a href="http://example.com">http://example.com</a>',
//'<a href="http://wordpress.org">This is already a link www.wordpress.org</a>', // fails in 3.3.1 too

http://core.trac.wordpress.org/browser/trunk/wp-includes/formatting.php#L1622

// Cleanup of accidental links within links
$r = preg_replace( '#(<a( [^>]+?>|>))<a [^>]+?>([^>]+?)</a></a>#i', "$1$3</a>", $r );

http://core.trac.wordpress.org/browser/trunk/wp-includes/default-filters.php#L151

add_filter( 'comment_text', 'make_clickable',      9 );

#4 @johnjamesjacoby
12 years ago

  • Milestone changed from 2.3 to Future Release

I'm inclined to close this, since all signs point to this being an issue in WordPress core.

Moving to Future Release for now.

#5 @johnjamesjacoby
12 years ago

  • Description modified (diff)
  • Summary changed from HTML HREF TITLE Element Rendering to Anchors that include URL's w/ other text & spaces get formatted incorrectly

#6 @johnjamesjacoby
12 years ago

  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Closing. See: #WP23050.

#7 @netweb
11 years ago

WP#23050 now has a patch (not commited yet)

Note: See TracTickets for help on using tickets.