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

Remove all instances of xlink:href #544

Open
benkasminbullock opened this issue May 19, 2021 · 3 comments
Open

Remove all instances of xlink:href #544

benkasminbullock opened this issue May 19, 2021 · 3 comments

Comments

@benkasminbullock
Copy link
Contributor

Apparently xlink:href is obsolete and should be replaced with href:

https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href

I used this script to replace them all:

#!/home/ben/software/install/bin/perl
use warnings;
use strict;
use utf8;
use FindBin '$Bin';
use File::Slurper qw!read_text write_text!;
my @svgs = <$Bin/images/svg/*.svg>;
for my $file (@svgs) {
    my $text = read_text ($file);
    if ($text =~ s!xlink:href!href!g) {
	write_text ($file, $text);
    }
}

@edent
Copy link
Owner

edent commented May 31, 2021

Heya, we discussed this a few years ago - #184

At the time, Safari didn't render without xlink. And we couldn't convert to Android Drawables. Do you know if these issues have been fixed?

@benkasminbullock
Copy link
Contributor Author

That issue appears to have been resolved:

https://bugs.webkit.org/show_bug.cgi?id=153854

But several of the Super Tiny Icons use href without xlink so I guess it should be consistent.

@PaulCapron
Copy link
Collaborator

But several of the Super Tiny Icons use href without xlink so I guess it should be consistent.

Only two, after just a quick manual glance; google_drive.svg and tiktok.svg.

Because they are SVG2, they do not display correctly using Ubuntu Image viewer and/or Inkscape and/or Emacs image display mode. For more info, see #543

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

3 participants