The discussion revolves around a bug where smart quotes break the appearance of posts when quoting text in Discourse. jtbayly reports that selecting text and using the “Quote” function sometimes inserts a smart quote (curly quote) in the BBCode block, causing display issues. This occurs intermittently in Safari 18.4 and 15.3 on macOS, affecting sites running Discourse 3.4.2 and 3.4.0.beta3-dev. per1234 suggests disabling the “Markdown typographer” feature or removing double quotes from its settings as a workaround. sam notes that Discourse already has code to handle such edge cases but questions whether the issue is related to the new composer, which is not enabled on the affected sites. jtbayly confirms that disabling smart quotes in Safari’s settings resolves the issue but is not ideal. renato explains the root cause: inconsistent quotation marks in the BBCode block, noting that both quotes are converted if typed manually, but only the closing quote is affected during quoting. jtbayly observes the inconsistency and wonders if matching different quote styles like " and ” could be a simple fix. sam suggests updating the parser to handle such quote pairs and other odd quoting styles.
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):
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?