Skip to content

Stripping \b makes some projects not load. #56

@kchadha

Description

@kchadha

Project 286851747 suffers from the backspace control character getting stripped out too aggressive. See scratchfoundation/scratch-gui#4767 (comment).

A possible solution is to not strip out \b if it is preceded by another \ (e.g. the user defined string in a list value in this project, 'have\\been')

Related issue

In this issue: scratchfoundation/scratch-www#3497 , @adroitwhiz gave the following description. @benjiwheeler was able to reproduce the problem.

If any string input/argument in any block in a project contains the substring "\b" anywhere, attempts to save the project to the Scratch server will result in an HTTP 500 error.

Other backslash sequences ("\n", "\t", etc.) seem to work fine--I've tested all letters of the alphabet (in lowercase) and only "\b" causes a 500 error.

Downloading the project as a .sb3 works fine, so this appears to be a website issue which is why I'm filing this bug against scratch-www (there's no public repo for the Scratch backend).

To Reproduce:

  1. Type a string containing "\b" into any text input:
    image
  1. Observe the 500 error when saving:
    image
    image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions