Use of ASCII Encoding in image file name references
I am using a combination of BBEdit and Marked 2 for Markdown file creation and editing.
I have just noticed a strange anomaly. See the following code (it refers to the image file attached):
This works in Marked 2
<p style="text-align: center;"><img src="It%27s%20not%20a%20%22cost%20of%20living%20crisis%22.png"></p>
This works in Marked 2
<p style="text-align: center;"><img src="It's%20not%20a%20%22cost%20of%20living%20crisis%22.png"></p>
This works in Marked 2
![Image](It%27s%20not%20a%20%22cost%20of%20living%20crisis%22.png)
This DOES NOT work in Marked 2
![Image](It's%20not%20a%20%22cost%20of%20living%20crisis%22.png)
All FOUR versions work in BBEdit preview.
The issue occurs in the first word of the file's name (It's). In the HTML examples it doesn't matter whether "'" or "%27" is used for the single quote. In the Markdown syntax examples only the "%27" works for a single quote.
I'm not sure if this is an error or problem; I have a working option so it's (or should that be It%27s) not a problem for me. Brett and others might be interested.
Regards,
Peter
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 04 Aug, 2024 12:10 PM
Edited from Sublime, both of these work in Marked with either default
processor:
```
![Image](It%27s%20not%20a%20%22cost%20of%20living%20crisis%22.png)
![Image](It's%20not%20a%20%22cost%20of%20living%20crisis%22.png)
```
I imagine BBEdit is doing some escaping of some kind? How are you
previewing in Markedfrom BBEdit?
-Brett
On 4 Aug 2024, at 4:31, peter2536 wrote: