popcodeorg / popcodeorg/popcode

Error Detection Creates False Positives if Non-US Keyboard Characters Used

Open
#341 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
191
Forks
143
Avg merge
4d 11h
Merged PRs (30d)
5

Description

In our class today a student's chromebook was, for some reason, set to use the international keyboard setting.

As a result she got an error nag about needing to use "s for her href attribute because the double-quotes were typed with international characters. The tag was visibly correct. Switching the chromebook to US Keyboard setting fixed the issue with visibly different " characters in the IDE.

Valid: <img src="//placekitten.com/100/100">
Not valid (US international keyboard): <img src=¨//placekitten.com/100/100¨>

The W3C validator gives the following error for on that character:

Line 2, Column 18: an attribute value must be a literal unless it contains only name characters
<img src=¨//placekitten.com/100/100¨>

You have used a character that is not considered a "name character" in an attribute value. Which characters are considered "name characters" varies between the different document types, but a good rule of thumb is that unless the value contains only lower or upper case letters in the range a-z you must put quotation marks around the value. In fact, unless you have extreme file size requirements it is a very very good idea to always put quote marks around your attribute values. It is never wrong to do so, and very often it is absolutely necessary.

https://github.com/popcodeorg/popcode/issues/179

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Reproduce the reported snippets in the editor and trace the error-detection path for international-keyboard quote characters, using issue #179 as context; done means valid-looking input no longer produces a false positive while genuinely invalid markup is still reported.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.