Skip to content

svg images in ReST documents omitted due to use of <object> tag filtering #264

Closed

Description

@mr-c

Example ReST:

.. image:: https://scan.coverity.com/projects/621/badge.svg
   :target: https://scan.coverity.com/projects/621
   :alt: Coverity Scan Build Status

Live example: https://github.com/ged-lab/khmer/blob/d7a079c8c22062e06687ad0bacabe93f35230210/README.rst

Activity

  1. bkeepers commented on Mar 7, 2014

    @bkeepers
    Contributor

    What is the output generate? We definitely can't allow object due to security and usability concerns.

  2. mr-c commented on Mar 7, 2014

    @mr-c
    Author
    $ github-markup README.rst
    [...]
    <a class="reference external image-reference" href="
    https://scan.coverity.com/projects/621"><object data="
    https://scan.coverity.com/projects/621/badge.svg"
    type="image/svg+xml">Coverity Scan Build Status</object></a>
    [...]
    

    On Fri, Mar 7, 2014 at 5:15 PM, Brandon Keepers notifications@github.comwrote:

    What is the output generate? We definitely can't allow object due to
    security and usability concerns.

    Reply to this email directly or view it on GitHubhttps://github.com//issues/264#issuecomment-37073809
    .

  3. bkeepers commented on Mar 8, 2014

    @bkeepers
    Contributor

    Historically, I think object was the most reliable way to embed SVG, but now it looks like the img tag works in all browsers. I don't know what it would take to get ReST to generate an img tag, but that's what needs done.

  4. added a commit that references this issue on Mar 8, 2014
  5. mr-c commented on Mar 10, 2014

    @mr-c
    Author

    I've filed a bug with a patch to docutils to fix this: https://sourceforge.net/p/docutils/bugs/247/

  6. bkeepers commented on Mar 10, 2014

    @bkeepers
    Contributor

    Awesome. My python is not strong, but I'm guessing it would be possible to implement this in the GitHubHTMLTranslator in rest2html for now. Pull requests are welcome!

  7. myint commented on Apr 12, 2014

    @myint

    A temporary hack to workaround this is to put some junk at the end of the URL to fool docutils.

    myint/perceptualdiff@6e769cb#diff-88b99bb28683bd5b7e3a204826ead112R15

  8. added a commit that references this issue on Apr 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions