js-generator icon indicating copy to clipboard operation
js-generator copied to clipboard

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

Open FanJups opened this issue 2 years ago • 1 comments

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

FanJups avatar Apr 24 '23 09:04 FanJups

Ive Just tested on JsFiddle , <div>I am a <strong>tea pot</strong> is rendered without no issues

FanJups avatar Aug 19 '25 08:08 FanJups