We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The problem manifest itself when reading a HTML file and outputting it again to a HTML string.
<!DOCTYPE html> <head> <title>debug</title> </head> <body> <svg id="draw_area" width="600" height="800" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"> <image id="overlay_img" xlink:href="foo.png" x="0" y="0" width="600" height="800" /> </svg> </body> </html>
NSString *dpath = [[NSBundle mainBundle] pathForResource:@"debug" ofType:@"html"]; NSString *dcontent = [NSString stringWithContentsOfFile:dpath encoding:NSUTF8StringEncoding error:nil]; HTMLDocument* ddocument = [HTMLDocument documentWithString:dcontent]; dcontent = [[ddocument documentElement] innerHTML];
After above code the variable dcontent contains:
dcontent
<head> <title>debug</title> </head> <body> <svg id="draw_area" width="600" height="800" xmlns="http://www.w3.org/2000/svg" xmlns xlink="http://www.w3.org/1999/xlink" version="1.1"> <image id="overlay_img" xlink href="foo.png" x="0" y="0" width="600" height="800"></image> </svg> </body>
Note how xmlns:xlink is converted to xmlns xlink and xlink:href to xlink href after outputting the content to HTML again. This broke the svg.
xmlns:xlink
xmlns xlink
xlink:href
xlink href
The text was updated successfully, but these errors were encountered:
9dd3c70
Can this code be released?
Sorry, something went wrong.
Add test for bug fix issue #30
7617fce
@benny-innofaith Done. Sorry for forgetting this. It just slipped my mind.
No branches or pull requests
The problem manifest itself when reading a HTML file and outputting it again to a HTML string.
debug.html
After above code the variable
dcontent
contains:Note how
xmlns:xlink
is converted toxmlns xlink
andxlink:href
toxlink href
after outputting the content to HTML again. This broke the svg.The text was updated successfully, but these errors were encountered: