Skip to content

Why does p5js overwrite the global escape() function with different behavior? #461

@mhintz

Description

@mhintz

Hello!

Thanks for a great project! I think it's really cool to bring Processing to the browser.

I'm using p5js in a prototype project, and I've just found that it overwrites the global escape() function with a new function that provides slightly different behavior. The default global escape() converts the ASCII apostrophe:

'

into:

"%27"

whereas p5js escape() converts it to:

"'"

I'm not sure if there are other characters where encoding is affected in this way.
If this is a bug, I'm glad I caught it. If not a bug, could you document the reason for it?

Thanks much!
Mark

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