Search code examples
htmlwordpresswordpress-jetpack

External links inside a block of shortcode are being treated as internal links. How can I fix it?


I want to place some external links inside Jetpack's [recipe-ingredients] shortcode block.

However, when I view the published post, the links are being treated as internal links instead of external links.

Here's an image of the problem: enter image description here

As you can see; the link gets appended to the end of my blog URL instead of just linking to the external website. This happens even if I add https:// to the a href link. Links that are in normal paragraphs (not shortcode blocks) behave normally.

Is there someway I can fix this?


Solution

  • I fixed it! What worked was removing the quotes ("") around the URL in the a href tag.

    For some reason, the quotes are being auto-applied to the URL, so it ended up doubling them in the output, thus creating the internal linking issue.