Use of ASCII Encoding in image file name references

peter2536's Avatar

peter2536

04 Aug, 2024 09:29 AM

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

  1. Support Staff 1 Posted by Brett on 04 Aug, 2024 12:10 PM

    Brett's Avatar

    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:

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • It's_not_a_"cost_of_living_crisis".png 72.3 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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