popcodeorg / popcodeorg/popcode
Error Detection Creates False Positives if Non-US Keyboard Characters Used
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 191
- Fork
- 143
- Merge trung bình
- 4 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 5
Mô tả
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.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Không có tệp nguồn hoặc bài kiểm thử nào được nêu. Hãy tái hiện các đoạn mã được báo cáo trong trình soạn thảo và lần theo đường dẫn phát hiện lỗi đối với các ký tự dấu ngoặc kép trên bàn phím quốc tế, sử dụng issue #179 làm ngữ cảnh; hoàn thành khi đầu vào trông có vẻ hợp lệ không còn tạo ra false positive, trong khi markup thực sự không hợp lệ vẫn được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- frontend, web-dev
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 30/100