everytime you use a comma

kat65
everytime you use a comma
kat65@bde8ef59 Saturday 13th September 2025, 17:39:17

Every time I use a comma on my forum, it replaces it with something like this 's on my forum Im currently using caddy as my web server on a Debian 12 VPS

Last modified by kat65@bde8ef59 on Saturday 13th September 2025, 17:40:00

Replies 5
SurveyBuilder-Admin
Gavin  Saturday 13th September 2025, 18:35:19

First of all comma's don't get encoded, but the apostrophe and other special characters are converted. So

- and symbol
- greater than
- less than
- apostrophe
etc...

Probable because htmlspecialchars() is converting it all at the same.

Last modified by Gavin on Saturday 13th September 2025, 18:38:00
A Web developer and web security programmer

kat65
kat65@bde8ef59  Saturday 13th September 2025, 18:38:25

I changed the editor from markdown to bbcode and that seems to fix it

SurveyBuilder-Admin
Gavin  Monday 15th September 2025, 04:04:26

Cool. Something went wrong with the Markdown file then. Glad it works!
A Web developer and web security programmer

cascas
cascas@7db04acd  Saturday 27th September 2025, 20:23:12

 

I also had problems with the Markdown option. I switched to BBCode. Everything is fine.

Fred
Fred  Monday 29th September 2025, 17:14:38

Sorry for my late reply, I have a fix to test so I can update Flatboard. In the lib/Parser.lib.ph folder, search for:
    public static function content(string $text, bool $summary = false): string
{
global $config;
if ($config['editor'] === 'markdown') {
global $Parsedown, $BBlight;
// Parse markdown content.
$text = $Parsedown->text($text);
$text = $BBlight->toHTML($text, false, true);
} else {
global $BBcode;
// Parse BBcode content.
$text = $BBcode->toHTML($text, false, true);
}
return $text;
}

and replace with:
    public static function content(string $text, bool $summary = false): string
{
global $config;

// Décoder les entités HTML avant le parsing
$text = html_entity_decode($text, ENT_QUOTES | ENT_HTML5, 'UTF-8');

if ($config['editor'] === 'markdown') {
global $Parsedown, $BBlight;
$text = $Parsedown->text($text);
$text = $BBlight->toHTML($text, false, true);
} else {
global $BBcode;
$text = $BBcode->toHTML($text, false, true);
}

return $text;
}

HTML entities must be decoded before parsing.
  • Before ask a question, read the documentation.
  • 🎉  Featured as #1 product of the day on Product Hunt
  • Please like in alternativeto.net 👍🏻
  • ╰☆╮Flatboard╰☆╮ is a open source and community contributions are essential to project success!
  • <TextField>, my new CMS project designed by a passionate developer, for developers!
  • My last project Fast⚡︎CMS, a Flat-File cms.
  • I am currently busy 😫.

Suggested Topics
Fred
29.1K 2
Asdd
Asdd@b8500609 started としまして
Open Bar
30.2K 1
Fred
27.9K 3
Want to read more? Browse all categories or view latest topics.