Flameborn / Kiramoji

Kiramoji is a modified version of the popular anonymous message board: Kareha.
24 stars 3 forks source link

Preview post feature produces garbled text #3

Closed dewheel closed 1 year ago

dewheel commented 1 year ago

The following text (skillful SJIS art of a baby) comes out garbled when the preview post feature is used:

                   , -‐  - 、
                /         、
             ,'            、
             |           ',
             |             l
             〈ヽ  -‐-  -‐-   '
    , - r '´ ̄ ̄ ̄ ヽ  く●〉  〈●ア ,'
   /  l   /      、   r_ _ュ    !
.  /    !  ,'         、 トェェェェイ ノ|  babubabu
  l    、   /    ヽ ー`==′ '∧
  }     、   !      i  \__ノ  /  ヽ
  !     \ ノ      , /   /\__ ノヽ
  /、       ト、     /  _, '     \   、
 ( ヽ      | `ー- __ノ-‐ ´       \ - ーァ
  \_ヽ    ノ   ゙、  ',               し‐、_ミ
     ̄ ̄ ̄     ヽ  ヽ
                 ヽ  ヽ
                   ヽ _ノ ー、
               | , , , 「.. 

When posted it comes out just fine as long as formatting is set to "Text art". Here's a screenshot of the issue. This issue can be reproduced on https://kiramoji.ga/

Flameborn commented 1 year ago

Thanks for reporting this.

It looks like the fields were encoded via encodeURIComponent using javascript, but the Perl backend did not decode the query parameter, and the returned response had no charset defined, either.

It should be fixed now.