Sample code:
$html = '<html><body><a href="https://google.com>google</a></body></html>';
$tidy = new tidy();
$tidy->parseString($html, array());
$tidy->cleanRepair();
var_dump($tidy->value);
Output:
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<a href=
"https://google.com%3Egoogle%3C/a%3E%3C/body%3E%3C/html%3E"></a>
</body>
</html>
I expect my href attribute to be "https://www.google.com", but instead i get "https://google.com%3Egoogle%3C/a%3E%3C/body%3E%3C/html%3E".
How to fix that correctly?
Thanks.