fix [entry] tag targets
This commit is contained in:
parent
378dbec981
commit
6c21f36d77
@ -84,6 +84,13 @@ class CProject {
|
||||
$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);
|
||||
$this->shortdesc = array_shift($parts);
|
||||
|
@ -138,7 +138,6 @@ function text2html($sz) {
|
||||
$base = preg_replace('~\\[b\\](.+?)\\[/b\\]~m', '<strong>\\1</strong>', $base);
|
||||
$base = preg_replace('~\\[i\\](.+?)\\[/i\\]~m', '<i>\\1</i>', $base);
|
||||
$base = preg_replace('~\\[spoiler\\](.+?)\\[/spoiler\\]~m', '<span class="spoiler">\\1</span>', $base);
|
||||
$base = preg_replace('~\\[entry=([^\\]]+?)\\](.+?)\\[/entry\\]~m', '<a href="\\1.html">\\2</a>', $base);
|
||||
$base = preg_replace('~\n- ~ms', "\n• ", $base);
|
||||
|
||||
$btparts = explode('`', $base);
|
||||
|
Reference in New Issue
Block a user