tweak text2html to fix html generation error. for some reason anchors arn't working in the header?
This commit is contained in:
parent
e732aa8b10
commit
9c9f514752
@ -115,9 +115,9 @@ function hesc($sz) {
|
|||||||
|
|
||||||
function text2html($sz) {
|
function text2html($sz) {
|
||||||
$base = hesc($sz);
|
$base = hesc($sz);
|
||||||
$base = preg_replace('~(https?://[^ \\r\\n\\t]+)~i', '<a href="\\1">\\1</a>', $base);
|
|
||||||
|
|
||||||
$base = preg_replace('~=+(.+)=+~', '<strong>\\1</strong>', $base);
|
$base = preg_replace('~=+(.+)=+~', '<strong>\\1</strong>', $base);
|
||||||
|
$base = preg_replace('~(https?://[^ \\r\\n\\t]+)~i', '<a href="\\1">\\1</a>', $base);
|
||||||
|
|
||||||
$btparts = explode('`', $base);
|
$btparts = explode('`', $base);
|
||||||
if (count($btparts) > 1 && (count($btparts) % 2)) {
|
if (count($btparts) > 1 && (count($btparts) % 2)) {
|
||||||
|
Reference in New Issue
Block a user