diff options
author | Yorhel <git@yorhel.nl> | 2020-09-02 13:46:45 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-09-02 13:46:47 +0200 |
commit | 3d53b0d6b8d9aa8e52c96c3ed6ac9f7dc1d660f4 (patch) | |
tree | 4d44b873b7e5d5483484cbd9cb6f0940723957c6 /lib/VNWeb/Releases | |
parent | d019f3a2bc73e9513ec6489ac742faa0f8f560dc (diff) |
BBCode: Consolidate bb2html & bb2text + only convert ids in thread titles
Fixing bb2html to only convert ids would complicate options a lot,
adding a new formatting function to only convert ids would make sense,
but then all formatting functions kind of look alike, so I figured a
single bb_format() to support all use cases may be a better approach.
Trigger for this was that people do (understandably) put [spoiler] in
thread titles, and that should not be interpreted as the spoiler tag.
Diffstat (limited to 'lib/VNWeb/Releases')
-rw-r--r-- | lib/VNWeb/Releases/Lib.pm | 2 | ||||
-rw-r--r-- | lib/VNWeb/Releases/Page.pm | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/VNWeb/Releases/Lib.pm b/lib/VNWeb/Releases/Lib.pm index 87f9c401..4aad7b50 100644 --- a/lib/VNWeb/Releases/Lib.pm +++ b/lib/VNWeb/Releases/Lib.pm @@ -92,7 +92,7 @@ sub release_row_ { } icon_ $MEDIUM{ $r->{media}[0]{medium} }{icon}, join ', ', map fmtmedia($_->{medium}, $_->{qty}), $r->{media}->@* if $r->{media}->@*; icon_ 'uncensor', 'Uncensored' if $r->{uncensored}; - icon_ 'notes', bb2text $r->{notes} if $r->{notes}; + icon_ 'notes', bb_format $r->{notes}, text => 1 if $r->{notes}; } tr_ sub { diff --git a/lib/VNWeb/Releases/Page.pm b/lib/VNWeb/Releases/Page.pm index d7cbb745..e60d84b6 100644 --- a/lib/VNWeb/Releases/Page.pm +++ b/lib/VNWeb/Releases/Page.pm @@ -212,7 +212,7 @@ TUWF::get qr{/$RE{rrev}} => sub { framework_ title => $r->{title}, index => !tuwf->capture('rev'), type => 'r', dbobj => $r, hiddenmsg => 1, og => { - description => bb2text $r->{notes} + description => bb_format $r->{notes}, text => 1 }, sub { _rev_ $r if tuwf->capture('rev'); @@ -221,7 +221,7 @@ TUWF::get qr{/$RE{rrev}} => sub { h1_ sub { txt_ $r->{title}; debug_ $r }; h2_ class => 'alttitle', lang_attr($r->{lang}), $r->{original} if length $r->{original}; _infotable_ $r; - p_ class => 'description', sub { lit_ bb2html $r->{notes} } if $r->{notes}; + p_ class => 'description', sub { lit_ bb_format $r->{notes} } if $r->{notes}; }; }; }; |