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

Nested anchor tag #997

Open
khoabui1412 opened this issue Aug 25, 2021 · 0 comments
Open

Nested anchor tag #997

khoabui1412 opened this issue Aug 25, 2021 · 0 comments

Comments

@khoabui1412
Copy link

Hi,
I have input html:

<!DOCTYPE html>
<html>
<body>
	<a href="">
		<table cellspacing="0" cellpadding="0" style="display: inline-block">
			<tbody>
				<tr>
					<td align="left" bgcolor="#215ca0" style="border-radius: 2px; display: block; text-align: center;margin: 0 auto; padding: 10px 96px; font-size: 20px; background-color: #215ca0">
						<a href="https://www.w3schools.com" class="elem-width padding-zero" style="color: #fff">
						Link                                                                                                    
						</a>
					</td>
				</tr>
			</tbody>
		</table>
	</a>
</body>
</html>

Through Tidy, it breaks the content:

<!DOCTYPE html>
<html>
	<head>
		<title/>
	</head>
	<body>
		<a href="">Link
			<table cellspacing="0" cellpadding="0" style="display: inline-block">
				<tbody>
					<tr>
						<td align="left" bgcolor="#215CA0" style="border-radius: 2px; display: block; text-align: center;margin: 0 auto; padding: 10px 96px; font-size: 20px; background-color: #215ca0"/>
					</tr>
				</tbody>
			</table>
		</a>
	</body>
</html>

I know nested anchor tag is not html standard, but since browser can display it, can Tidy support this?
Thank you.

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

1 participant