Page 1 of 1

Encoding of "|" to "|"?

Posted: Mon Feb 02, 2026 8:27 pm
by RainerBielefeld
I wanted to use Markdown to create tables, and it works fine. But there is an annoying detail: All Cell separators "|" will become encoded to "|"

STR:
  • Create a small table in a new Blogpost in a blog with Plugin "Markdown" enabled.

    Code: Select all

    |  Heading 1 |  Heading 2   |  Heading 3   |  Heading 4  |  
    |---|---|---|---|
    | a  | b  | c  |  d |  
    
  • Preview: » looks fine
  • Check posting source code: Opps, has changed to

    Code: Select all

    |  Heading 1 |  Heading 2   |  Heading 3   |  Heading 4  |  
    |---|---|---|---|
    | a  | b  | c  |  d |  
Additional Info

a) The modified table will look fine, but it's annoying to work within the table.
b)
And Annoying: Encoding will also happen in Code area between Code Tags.
c) My Config see here – but now 1.5.1 RC2!
d) Not related to that particular FP version, also in 1.3.1

Questions
z) Why? I also tested a wild characters sample

Code: Select all

[]æƶ˂˃˄˅˥˦֍‒–—―‖∑←↑→↓↔││
≈ Δ ΣΦΩ ∞ ◄► ▌ █ █ ▬ ½ ⅓ ⅔ ¼ ¾ ⅕ ⅖ ⅗ ⅘ ⅙ ⅛ ⅜ ⅝ ± ∞ % ‰ ▬► • · . „“ ►🔺◄ ▌██▌ 1⃣ 2⃣ 3⃣ 4⃣ 5⃣ 6⃣ 7⃣ 8⃣ 9⃣ 0⃣ #⃣ ≙ ≙ ≠≤≥ ≙ – - —
A¹ A² A³
µ µF 
All Characters remain untouched. What's the reason that "|" becomes encoded?
y) And can that encoding become switched off somehow / somewhere?

Re: Encoding of "|" to "|"?

Posted: Tue Feb 03, 2026 7:41 am
by RainerBielefeld
I found a suspicious area in <..../fp-includes/core/core.wp-formatting.php, but commenting it out destroyed my test FP 1.3.1

Re: Encoding of "|" to "&#124;"?

Posted: Tue Feb 03, 2026 12:52 pm
by fraenkiman
Hello Rainer,

This wiki article may answer your question:

https://wiki.flatpress.org/doc:tech:fileformats

Best regards,
Frank

Re: Encoding of "|" to "&#124;"?

Posted: Tue Feb 03, 2026 8:32 pm
by RainerBielefeld
Indeed, might be related. Now we need a solution, may be in Markdown Plugin. Because of FP's missing Table support the Markdown Tables (for me) are an important feature, and the Encoding Problem makes handling of tables confusing and prone to errors.

And we have an additional Encoding Problem in gallerycaptions plugin, details see here! Might be related to the "&#124; Problem"

Re: Encoding of "|" to "&#124;"?

Posted: Wed Feb 04, 2026 9:11 pm
by fraenkiman
Hello Rainer,

You were close, but still just off the mark.
The Parsedown plugin has no effect on #content <textarea>.

From now on, we will be using the old function fmt_unescape_separator() from the file fp-includes/core/core.wp-formatting.php; only in the right place (#803). However, we retain the <textarea> tag with |htmlspecialchars.

Screenshot 2026-02-04 222303.png
Screenshot 2026-02-04 222303.png (7 KiB) Viewed 1024 times
This means that the issue can be considered closed.
Best regards,
Frank

Re: Encoding of "|" to "&#124;"?

Posted: Wed Feb 04, 2026 11:36 pm
by fraenkiman
RainerBielefeld wrote: Tue Feb 03, 2026 8:32 pm ...
And we have an additional Encoding Problem in gallerycaptions plugin,
...
Fixed with commit 12727b6

Screenshot 2026-02-05 000529.png
Screenshot 2026-02-05 000529.png (35.69 KiB) Viewed 1017 times
Thank you very much and best regards,
Frank