213
edits
Line 100: | Line 100: | ||
The strategy currently used by the linkification code is to simply turn every URL into a view-source URL, and let things fall as they may. For text formats like CSS and JavaScript, the text is rendered the same whether the file is read from the raw URL or the view-source version of the raw URL. Unfortunately, images are not displayed the same. If an image file is retrieved through a view-source URL, the bytes that make up the image will be displayed as if they were text (this is a bug and should be fixed). The current proposal is to make the code that handles view-source URLs smarter and have it fall back to non-view-source behavior for MIME types that are not known to be text types. | The strategy currently used by the linkification code is to simply turn every URL into a view-source URL, and let things fall as they may. For text formats like CSS and JavaScript, the text is rendered the same whether the file is read from the raw URL or the view-source version of the raw URL. Unfortunately, images are not displayed the same. If an image file is retrieved through a view-source URL, the bytes that make up the image will be displayed as if they were text (this is a bug and should be fixed). The current proposal is to make the code that handles view-source URLs smarter and have it fall back to non-view-source behavior for MIME types that are not known to be text types. | ||
# HTML (text/html, | # HTML (text/html, application/xhtml+xml, etc.) | ||
# JavaScript (text/javascript, etc.) | # JavaScript (text/javascript, etc.) | ||
# CSS (text/css, etc.) | # CSS (text/css, etc.) | ||
# XML (text/xml, etc.) | # XML (text/xml, etc.) | ||
# SVG (image/svg+xml, etc.) | |||
# Images (image/gif, image/png, image/jpeg, etc.) | # Images (image/gif, image/png, image/jpeg, etc.) | ||
# Other MIME types | # Other MIME types |
edits