Forums

Text Links in Image Caption? (10 posts)

  1. databell96
    Member
    Posted 2 years ago #

    I have a client who wants to add some text links in her image captions but WP totally ignores HTML. Does anyone know of a workaround to add links to the text, not the image?

  2. Thomas Misund
    Member
    Posted 2 years ago #

    I have the same problem.

  3. alchymyth
    The Sweeper
    Posted 2 years ago #

  4. Thomas Misund
    Member
    Posted 2 years ago #

    As it turns out, you can work around this issie by using singly-quoted attributes instead of doubly-quoted, like so:

    <a href='example.com'>This should work</a>
    instead of
    <a href="example.com">This will be stripped</a>

    I have posted a Trac ticket about this issue, which has been assigned to "Future release", which means something like "We're not going to fix this right now, but maybe later."

  5. alchymyth
    The Sweeper
    Posted 2 years ago #

    @dnusim
    great, thank you for this information.

  6. Thomas Misund
    Member
    Posted 2 years ago #

    ... this workaround doesn't work in the visual editor, only in HTML view.

  7. nicksherman
    Member
    Posted 2 years ago #

    This would be great to have fixed, especially for things like Creative Commons image usage which often require a link with the credit.

  8. Marco Raaphorst
    Member
    Posted 2 years ago #

    that works when editing the image and saving it.

  9. Thomas Misund
    Member
    Posted 1 year ago #

    This issue seems to be resolved in trunk.

  10. Thomas Misund
    Member
    Posted 1 year ago #

    Update:

    Single quotes work in HTML mode. Double quotes in HTML mode (escaped or not) break the caption if caption="..." uses double quotes. Tags are stripped if you use the caption field in the Image GUI but the caption still works.

    Milestone for the Trac ticket is currently set to 3.1.

Topic Closed

This topic has been closed to new replies.

About this Topic