Add a client-side watcher that checks the DOM for potentially problematic elements.
Examples of problematic elements include:
ID, Name or Classes with backslashes as they need to be escaped when using jQuery selectors and they typically aren't. In most cases, this is seen when a class name is directly passed as part of the value and then blindly re-used in a selector.
Duplicate IDs
Other validations could be added as needed. The feature would have to periodically check to account for content loaded after the initial page load. If an element is reported, it shouldn't be reported again. Issues can be shown in the console.
Add a client-side watcher that checks the DOM for potentially problematic elements. Examples of problematic elements include: