Skip to content

[CLOSED] Add encodeFilePath to FileUtils to convert file paths into encoded strings (replace metacharacters such as %, @, $, #, etc.) #8210

@core-ai-bot

Description

@core-ai-bot

Issue by Mark-Simulacrum
Sunday Sep 21, 2014 at 17:42 GMT
Originally opened as adobe/brackets#9190


Cannot use encodeURI/encodeURIComponent because they replace # with %25, which is incorrect - should be replaced by %23.

I'm not sure if there is a Brackets' utility for this already (I searched for it but couldn't find it).

I've tested with test#tt.jpg and test%tt.jpg, but nothing else - are there any other special characters that should be added to this replace scheme?

Should this be moved to a module in utils/ and loaded from ImageViewer?

Fixes #9117.


Mark-Simulacrum included the following code: https://github.com/adobe/brackets/pull/9190/commits

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions