hachikuji-san / koko-overboard

overboard for kokonotsuba
Do What The F*ck You Want To Public License
2 stars 1 forks source link

quotelink is followed by greentext #3

Closed kaguy4 closed 1 month ago

kaguy4 commented 2 months ago

posts that start with a quotelink followed by text on the same line get improperly greentext's liek this: <blockquote class="comment"><span class="unkfunc"><a href="https://img.heyuri.net/b/koko.php?res=116416#p116429" class="quotelink">&gt;&gt;116429</a> test</span></blockquote>

it's as expected on actual board: image it's like this on the overboard: image

hachikuji-san commented 1 month ago

I'm not really sure how 2 fix this since i dont know what is causing it. I've looked into it before but didn't find anything it does differently in respect to how koko does it. Though if someone else is able to navigate my kuso code and find it then it would be a big help

an0nc0w commented 1 month ago

quote_unkfunc should come after quote_link, as it does in koko

diff --git a/overboard.php b/overboard.php
index 6b0e334..cd61ba3 100644
--- a/overboard.php
+++ b/overboard.php
@@ -164,8 +164,8 @@ function quote_link($comment, $dbBoardDetails){
 }

 function prepareComment($comment, $dbBoarDetails) {
-    $comment = quote_unkfunc($comment, $dbBoarDetails);
     $comment = quote_link($comment, $dbBoarDetails);
+    $comment = quote_unkfunc($comment, $dbBoarDetails);
     return $comment;
 }