Skip to content

fix: escape invalid id's to prevent WSOD #22

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
May 25, 2020
Merged

Conversation

smeijer
Copy link
Member

@smeijer smeijer commented May 25, 2020

Incorrect id attributes, can lead to a white-screen. One example of an invalid query that causing this is:

<button 
  id=
  name="submit" 
/>
container.querySelector('button')

playground

Everyone understands that this isn't valid HTML, but... it happens when we are typing in the editor.

@smeijer smeijer added the bug Something isn't working label May 25, 2020
@smeijer smeijer self-assigned this May 25, 2020
@smeijer smeijer force-pushed the feature/fix-id-escape branch from 3c315c3 to 0e44e84 Compare May 25, 2020 08:30
@smeijer
Copy link
Member Author

smeijer commented May 25, 2020

Same query is running fine on the deploy-preview:

image

@smeijer smeijer merged commit bf21003 into master May 25, 2020
@smeijer smeijer deleted the feature/fix-id-escape branch May 25, 2020 08:37
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant