userstyles-world / userstyles.world

⭐ Website to browse and share UserCSS userstyles. A modern replacement for UserStyles.org made by the userstyles community.
https://userstyles.world
GNU Affero General Public License v3.0
340 stars 15 forks source link

Don't convert standard quotes into opening and closing quotes #95

Open Procyon-b opened 3 years ago

Procyon-b commented 3 years ago

I have a sample config option given as an example in the description of a userstyle. It is writen inside a <code> tag and contains enclosing quotes. Stylus needs the quotes or it (gently) fails directly in the config dialog in the popup window. The way the sites works now, standard quotes are converted on the server side, and I have found no way to display them correctly to the user. Please, don't convert " (&quot;) into opening and closing quotes inside <code> and/or <sample>

I don't recall having this problem when I initially published the userstyle.

Gusted commented 3 years ago

Hi @Procyon-b!

That sounds like a weird case, a case which looking from your comment, shouldn't indeed be happening. Could you post a small example code whereby this is happening, so I can debug it for myself?

Regards, Gusted

Procyon-b commented 3 years ago

Here is the link to the userstyle: https://userstyles.world/style/1174/duckduckgo-background-image

I've removed the quotes in the description, but there is a duplicate of the line in the "notes" section. You should probably install the userstyle, or use one with a @var text ... When you paste the quoted url into stylus dialog, you'll see an error message in red background displaying the error message. It's not happening when standard quotes are used.

Looking in PSPad, the first quote is 8220/201C and the closing one is 8221/201D

vednoc commented 3 years ago

This is caused by our current Markdown parser. We'll be switching to another one, but for now you could do this:

Raw:

`"https://images5.alphacoders.com/104/thumb-1920-1043977.jpg"`

Output:

<code>"https://images5.alphacoders.com/104/thumb-1920-1043977.jpg"</code>

Try to use Markdown syntax instead of writing equivalent raw HTML where possible.

Procyon-b commented 3 years ago

Good solution. Modification applied. Thanks