WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
202806
W3C test importer breaks svg files.
https://bugs.webkit.org/show_bug.cgi?id=202806
Summary
W3C test importer breaks svg files.
Carlos Alberto Lopez Perez
Reported
2019-10-10 10:43:38 PDT
The WebKit W3C importer tries to rewrite the xml/html/css files when importing them to rewrite paths and such. The issue is that to decide if rewrite the file or not uses the mimetype and the current code just checks for something like if "xml" in str(mimetype[0]) but svg files have mimetype image/svg+xml so the above becomes true and it tries to rewrite a svg file breaking it.
Attachments
Patch
(2.65 KB, patch)
2019-10-10 10:52 PDT
,
Carlos Alberto Lopez Perez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Carlos Alberto Lopez Perez
Comment 1
2019-10-10 10:52:37 PDT
Created
attachment 380658
[details]
Patch
Jonathan Bedard
Comment 2
2019-10-10 12:18:09 PDT
Comment on
attachment 380658
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=380658&action=review
> Tools/Scripts/webkitpy/w3c/test_importer.py:514 > + _log.info("Rewriting: %s" % new_filepath)
Can we use .format strings? % encoding doesn't work in Python 3
Carlos Alberto Lopez Perez
Comment 3
2019-10-10 12:56:03 PDT
(In reply to Jonathan Bedard from
comment #2
)
> Comment on
attachment 380658
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=380658&action=review
> > > Tools/Scripts/webkitpy/w3c/test_importer.py:514 > > + _log.info("Rewriting: %s" % new_filepath) > > Can we use .format strings? % encoding doesn't work in Python 3
I think it does work in python3 without issue. $ python3 -c 'var="world"; print("Hello %s" % var)' Hello world
Jonathan Bedard
Comment 4
2019-10-10 13:01:16 PDT
(In reply to Carlos Alberto Lopez Perez from
comment #3
)
> (In reply to Jonathan Bedard from
comment #2
) > > Comment on
attachment 380658
[details]
> > Patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=380658&action=review
> > > > > Tools/Scripts/webkitpy/w3c/test_importer.py:514 > > > + _log.info("Rewriting: %s" % new_filepath) > > > > Can we use .format strings? % encoding doesn't work in Python 3 > > I think it does work in python3 without issue. > > $ python3 -c 'var="world"; print("Hello %s" % var)' > Hello world
You're totally right...not sure why I thought that didn't work in Python3.
Carlos Alberto Lopez Perez
Comment 5
2019-10-10 14:58:02 PDT
Comment on
attachment 380658
[details]
Patch Clearing flags on attachment: 380658 Committed
r250992
: <
https://trac.webkit.org/changeset/250992
>
Carlos Alberto Lopez Perez
Comment 6
2019-10-10 14:58:06 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7
2019-10-10 14:59:17 PDT
<
rdar://problem/56170891
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug