diff --git a/lib/CProject.php b/lib/CProject.php index 64b09ad..5ad7594 100644 --- a/lib/CProject.php +++ b/lib/CProject.php @@ -83,6 +83,13 @@ class CProject { if (preg_match('~Tags: ([^\\n]+)~', $this->longdesc, $matches)) { $this->tags = array_map('trim', explode(',', $matches[1])); } + + // Find `entry` tags + $this->longdesc = preg_replace( + '~\\[entry=([^\\]]+?)\\](.+?)\\[/entry\\]~m', + '[url='.BASEURL.'\\1/]\\2[/url]', // hesc still hasn't happened, transform bbcode->bbcode + $this->longdesc + ); // Extract short description $parts = explode("\n", $this->longdesc); diff --git a/lib/util.php b/lib/util.php index 756eff6..8204994 100644 --- a/lib/util.php +++ b/lib/util.php @@ -138,7 +138,6 @@ function text2html($sz) { $base = preg_replace('~\\[b\\](.+?)\\[/b\\]~m', '\\1', $base); $base = preg_replace('~\\[i\\](.+?)\\[/i\\]~m', '\\1', $base); $base = preg_replace('~\\[spoiler\\](.+?)\\[/spoiler\\]~m', '\\1', $base); - $base = preg_replace('~\\[entry=([^\\]]+?)\\](.+?)\\[/entry\\]~m', '\\2', $base); $base = preg_replace('~\n- ~ms', "\n• ", $base); $btparts = explode('`', $base);