Fork me on GitHub
Subscribe 4

Ticket #888 (fixed bug)

Notices in FluxBB 1.5.4

  • Created: 2013-08-18 02:53:32
  • Reported by: Visman
  • Assigned to: Franz
  • Milestone: 1.5.5
  • Component: parser
  • Priority: normal

History

Visman 2013-08-18 12:59:27

curve crutch

//
// Make hyperlinks clickable
//
function do_clickable($text)
{
	$text = ' '.$text;
	$text = ucp_preg_replace_callback('%(?<=[\s\]\)])(<)?(\[)?(\()?([\'"]?)(https?|ftp|news){1}://([\p{L}\p{N}\-]+\.([\p{L}\p{N}\-]+\.)*[\p{L}\p{N}]+(:[0-9]+)?(/(?:[^\s\[]*[^\s.,?!\[;:-])?)?)\4(?(3)(\)))(?(2)(\]))(?(1)(>))(?![^\s]*\[/(?:url|img)\])%ui', 'stripslashes($matches[1].$matches[2].$matches[3].$matches[4]).handle_url_tag($matches[5]."://".$matches[6], $matches[5]."://".$matches[6], true).stripslashes($matches[4].$matches[10].$matches[11].$matches[12])', $text);
	$text = ucp_preg_replace_callback('%(?<=[\s\]\)])(<)?(\[)?(\()?([\'"]?)(www|ftp)\.(([\p{L}\p{N}\-]+\.)+[\p{L}\p{N}]+(:[0-9]+)?(/(?:[^\s\[]*[^\s.,?!\[;:-])?)?)\4(?(3)(\)))(?(2)(\]))(?(1)(>))(?![^\s]*\[/(?:url|img)\])%ui','stripslashes($matches[1].$matches[2].$matches[3].$matches[4]).handle_url_tag($matches[5].".".$matches[6], $matches[5].".".$matches[6], true).stripslashes($matches[4].$matches[10].$matches[11].$matches[12])', $text);

	return substr($text, 1);
}

-->

//
// Make hyperlinks clickable
//
function do_clickable($text)
{
	$text = ' '.$text;
	$text = ucp_preg_replace_callback('%(?<=[\s\]\)])(<)?(\[)?(\()?([\'"]?)(https?|ftp|news){1}://([\p{L}\p{N}\-]+\.([\p{L}\p{N}\-]+\.)*[\p{L}\p{N}]+(:[0-9]+)?(/(?:[^\s\[]*[^\s.,?!\[;:-])?)?)\4(?(3)(\)))(?(2)(\]))(?(1)(>))(?![^\s]*\[/(?:url|img)\])%ui', 'stripslashes($matches[1].$matches[2].$matches[3].$matches[4]).handle_url_tag($matches[5]."://".$matches[6], $matches[5]."://".$matches[6], true).stripslashes($matches[4].flux_empty($matches,10).flux_empty($matches,11).flux_empty($matches,12))', $text);
	$text = ucp_preg_replace_callback('%(?<=[\s\]\)])(<)?(\[)?(\()?([\'"]?)(www|ftp)\.(([\p{L}\p{N}\-]+\.)+[\p{L}\p{N}]+(:[0-9]+)?(/(?:[^\s\[]*[^\s.,?!\[;:-])?)?)\4(?(3)(\)))(?(2)(\]))(?(1)(>))(?![^\s]*\[/(?:url|img)\])%ui','stripslashes($matches[1].$matches[2].$matches[3].$matches[4]).handle_url_tag($matches[5].".".$matches[6], $matches[5].".".$matches[6], true).stripslashes($matches[4].flux_empty($matches,10).flux_empty($matches,11).flux_empty($matches,12))', $text);

	return substr($text, 1);
}

function flux_empty($arr, $num)
{
	return isset($arr[$num]) ? $arr[$num] : '';
}

adaur 2013-08-18 14:01:10

  • Milestone set to 1.5.5.

JohnLewis 2013-08-30 02:27:52

  • Owner set to JohnLewis.

Pulled.

Comment edited 1 times (Diff)

JohnLewis 2013-08-30 20:19:22

  • Owner JohnLewis removed.

Franz 2013-09-05 22:27:16

  • Status changed from open to duplicate.

Closing as duplicate of ticket #887, even though this one has the nicer number. smile

Visman 2013-09-06 04:42:46

It not duplicate of the 887th ticket!

Franz 2013-09-06 19:38:19

  • Owner set to Franz.
  • Status changed from duplicate to open.

Oh? Sorry about that...

Franz 2013-11-14 00:17:47

  • Status changed from open to fixed.

Thank you, fixed now.

Franz 2013-11-14 00:18:52

Commit d70d0a5 to fluxbb master

#888: Fix undefined index errors. Thanks, Visman.