Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

grade upload silently rejects valid HTML #10

Open
samuelgruetter opened this issue May 4, 2020 · 1 comment
Open

grade upload silently rejects valid HTML #10

samuelgruetter opened this issue May 4, 2020 · 1 comment

Comments

@samuelgruetter
Copy link

I used the grade upload function to upload reviews like

It looks like you understood conceptually how to construct a bad program, but what you wrote down in Coq is not what you meant. I think the confusion comes from the fact that the semicolon can have two meanings: It can separate list elements, but it's also used in the notation for (Bind c f), which is printed as "x <- c; f x".<br/>
If you write<br/>
<br/>
Example bad: prog :=<br/>
  [Lock 1 ; Lock 2] ++ [Lock 2 ; Lock 1].<br/>
<br/>
you get a program consisting of 4 threads. What you meant is<br/>
<br/>
Example bad: prog := [(_ <- Lock 1; Lock 2); (_ <- Lock 2; Lock 1)].<br/>
<br/>
If you think your difficulties were related to understanding "Bind", please ask about it in the office hours!

This is valid HTML according to https://validator.w3.org/check, but when I checked the display on the website, it says HTML error: Unknown HTML tag -.

I suspect it's related to the semicolon, but apparently a semicolon inside quotes does not cause a problem.

The fix for this instance was easy: Just manually edit using the website.

But there are two problems to fix:

  • If you upload HTML which the website doesn't consider valid, it should show an error during the upload.
  • It should accept all valid HTML.
@achlipala
Copy link
Owner

Task accepted to raise a proper error on invalid HTML (though I might very well save that task for a future semester).

FWIW, the HTML error in your example is the < characters, which should be &lt;s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants