Skip to content

Unicode characters in playground scripts break URL hash generation #103

@emuell

Description

@emuell

To reproduce:

  • add some non latin character into a script at (such as ★) at https://pattrns.renoise.com
  • hash won't be generated. Console log dumps:
InvalidCharacterError: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.
    at Object._encodeScript (https://pattrns.renoise.com/app.js:629:16)
    at Object._updateHash (https://pattrns.renoise.com/app.js:649:30)
    at c.value (https://pattrns.renoise.com/app.js:696:22)
    at u._deliver (https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.52.2/min/vs/editor/editor.main.js:71:910)
    at u._deliverQueue (https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.52.2/min/vs/editor/editor.main.js:71:1001)
    at u.fire (https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.52.2/min/vs/editor/editor.main.js:71:1336)
    at c.value (https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.52.2/min/vs/editor/editor.main.js:695:19054)
    at u._deliver (https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.52.2/min/vs/editor/editor.main.js:71:910)
    at u.fire (https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.52.2/min/vs/editor/editor.main.js:71:1229)
    at I._emitOutgoingEvents (https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.52.2/min/vs/editor/editor.main.js:111:131434)

Original report: https://forum.renoise.com/t/renoise-3-5-4-and-redux-1-4-4-bugfix-update/78430/2

Metadata

Metadata

Assignees

No one assigned

    Labels

    playgroundPattrns playground issue

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions