osscameroon / js-generator

Generates JavaScript from HTML
https://osscameroon.github.io/js-generator/
MIT License
19 stars 14 forks source link

Reproduce a closing tag missing event or any HTML code with errors to see how core reacts #233

Open FanJups opened 1 year ago

FanJups commented 1 year ago

It's a bad practice to not add required closing tag, the browser does its best to handle but it is not safe. In that kind of situation, how should we react ? Inform the user ? I think before translating, we should inform the user to make sure the html code is correct because the app will do the best it can to provide a Js code matching HTML input. If possible, we should inform the user if something is wrong. As an illustration, Google translate tries to understand your input and makes proposal "Did you mean: ...." if something is going wrong.

We could have something like this:

Please, before processing with the conversion, follow these links to verify if your HTML code is correct :

https://www.aliciaramirez.com/closing-tags-checker/ https://validator.w3.org/#validate_by_input

We started talking about it here : https://github.com/osscameroon/js-generator/issues/157