php-htmldiff
php-htmldiff copied to clipboard
Problem when part of text in anchor is taken out of anchor tag
I took a quick look at your demo and tried a few different string changes and noticed the following issues:
- When taking out text that was inside an anchor tag, the text that was taken out shows up in the compared html inside an anchor tag of its own rather than showing up with no anchor tag. For instance, when going from
$html1 = Check <a href="http://google.com">this out</a>.
to$html2 = Check <a href="http://google.com">this</a> out.
- When putting text that was outside of an anchor into an anchor (the opposite to the above example), the text that is now inside the anchor still shows up outside the anchor in the comparison html.
- Any change to the href or other attributes of an anchor is not indicated in any way in the comparison html. The most appropriate behavior would be to show the entire anchor element twice; first, the original anchor element inside a "del" tag, and second, the modified one inside an "ins" tag.