diff --git a/inc/html.php b/inc/html.php index 84a59f408010efe397f6366766c2838731e90af9..4059d12860f76256d26312f04119196c9bdcfa23 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1560,7 +1560,7 @@ function html_softbreak_callback($match){ // its a long string without a breaking character, // make certain characters into breaking characters by inserting a - // breaking character (zero length space, U+200B / #8203) in front them. + // word break opportunity (<wbr> tag) in front of them. $regex = <<< REGEX (?(?= # start a conditional expression with a positive look ahead ... &\#?\\w{1,6};) # ... for html entities - we don't want to split them (ok to catch some invalid combinations) @@ -1570,7 +1570,7 @@ function html_softbreak_callback($match){ )+ # end conditional expression REGEX; - return preg_replace('<'.$regex.'>xu','\0​',$match[0]); + return preg_replace('<'.$regex.'>xu','\0<wbr>',$match[0]); } /**