תוכחות חכמות משבשות תבנית הציטוט

On at least two different Discourse sites I’ve run into a problem where when I select text and hit “Quote” to reply, smart quotes get used in one place which breaks the appearance of my post. Here is a screenshot of an example post that is displaying incorrectly because of the smart quote at the end of the first line (inside the brackets):

This has been happening for months, and I only just figured out what was going on with those posts.

I can reproduce it about 50% of the time on Safari 18.4 on Mac OS 15.4 as well as an earlier version of Safari on Mac OS 15.3.

The site I run where I see it is running Discourse 3.4.2. Another site I just ran into it on is running 3.4.0.beta3-dev.

I believe I have also seen some other people running into this issue on my site, but I haven’t double checked that today.

לייק 1

Obviously a true fix should be made for a bug, but in case it will be useful in the meantime I’ll mention that a workaround might be to remove double quotes from the Markdown typographer quotation marks site setting, or disable the Enable markdown typographer site setting.

I am assuming that it is this “Markdown typographer” feature that is causing the replacement of the correct straight double quote character in the BBCode tag with the incorrect “smart” or “curly quote” character.

Its a good hunch, but I remember a similar issue from years ago and recall we even carry some code in Discourse that converts “→ " to handle this edge case.

@jtbayly do these sites have the new composer enabled?

אף אחד מהם לא הפעל את הפקודה החדשה.

משתמש אחר מדווח שאם אכביתי את ההחלפות של ציטוטים חכמים ב-Safari דרך עריכה → החלפות → ציטוטים חכמים, זה יתקן את זה.

אבל אני לא באמת רוצה לעשות את זה. חחฉ. אני אוהב את הציטוטים החכמים שלי רוב הזמן.

I think this is the issue, in addition to the fact we imitate user input on the textarea on this type of addition to avoid losing the undo history.

I believe it can be “solved” with a spellcheck="false" on the element, but it has an obvious downside.

What’s causing the issue is the inconsistent quotation, it would work if it had the same style of quotes on both ends – any of these sets can be used:

It’s weird that only the second quotation mark got converted when quoting though, both sides get converted if the same BBCode is typed manually.

2 לייקים

הבעיה גם אינה עקבית. זה לא קורה בכל פעם, אף שרק לא הצלחתי להבין מתי זה קורה ומתי לא.

זה מצחיק שזה עובד עם כל כך הרבה אופציות של מרכאות, אבל באחת מהם זה לא עובד. אני תוהה…

האם זה באמת יהיה תיקון פשוט ולא יגרום לבעיות להתאים את סגנונות המרכאות הלא עקביים? " ו-” בפרט?

should we amend our parser to allow for the pair " ” and various obscure weird quoting that finds itself into bbcode?

לייק 1