Fix broken HTML

Fix broken HTML

If the HTML from the theme or other plugins is not very well formatted, it can sometimes cause issues when using TranslatePress.
For example, using duplicated attributes in a tag can cause missing attributes, which in turn can lead to unexpected behavior of the website when browsing a translated page.
We have solutions that attempt fixing broken HTML. Go to Settings -> TranslatePress -> Advanced tab.

Activate option Fix spaces between HTML attributes first (attributes without spaces between them are not valid HTML)
If the first fix doesn』t work, try activating option Fix broken HTML. Only try this if you still have problems after using the first solution

If your issue is still not solved, look for bad formatting in the missing HTML and correct it in the plugins/theme.
Common bad formatting includes duplicate attribute on same tag, like the class attribute in the following example:

The correct version would be:

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注