Skip to content

Phoenix editor throws error if sequence contains a tab character #1722

@parkerabercrombie

Description

@parkerabercrombie

Checked for duplicates

Yes - I've already checked

Is this a regression?

No - This is a new bug

Version

3.0.1

Describe the bug

The Phoenix editor displays the following error in the log if the sequence contains a tab character (or presumably other unexpected characters). There is no error visible to the user, but the "save" button in Phoenix starts to act strange (e.g. appear disabled even when the sequence has been edited).

Reproduction

Paste the attached sequence into Phoenix and open the browser console. Note that there is a tab character between "Hello" and "World".

bad-char-seq.txt

Logs

VM6792:1 Uncaught (in promise) SyntaxError: Bad control character in string literal in JSON at position 6 (line 1 column 7)
    at JSON.parse (<anonymous>)
    at PA (modal.C1hBavF9.js:111:3386)
    at rp (modal.C1hBavF9.js:111:4136)
    at N7 (modal.C1hBavF9.js:111:8091)
    at DA (modal.C1hBavF9.js:111:2695)
    at Object.P7 [as toOutputFormat] (modal.C1hBavF9.js:111:689)
    at sequenceUpdateListener (SequenceEditor.D_sZEBSE.js:24:17634)
    at f (modal.C1hBavF9.js:9:26737)
    at C (modal.C1hBavF9.js:9:27027)
    at m (modal.C1hBavF9.js:9:26966)

System Info

Chrome

Severity

Moderate

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions