1

I have a page that I am adding, and for my purposes I want to have a text-only URL without an automatic link, but only for that one link, on this specific page. I need to be able to add full HTML content to the page, and I would prefer if other URLs on the page automatically became links.

I have tried putting other tags around the URL and HTML-escaping certain characters in the URL, but it still gets converted to a link.

Is there a way to prevent a specific URL from becoming a link?

1 Answer 1

1

The only way I think it is possible to selectively disable the "Convert URLs into links" filter is to use CSS and add something like below to the body. Since CSS is applied client-side after Drupal has returned the page, the filter is effectively disabled for this one single link.

<style type="text/css">
  .mylink > span {
    display:none;
  }
  .mylink:after {
    content: 'http://www.google.com';
  }
</style>
<p class="mylink"><span>blah</span></p>

Since you are using the 'Full HTML' format, you should be able to add CSS directly into the body field like shown.

1
  • 1
    That's a creative idea. Nice. I'll take a look on Monday.
    – mbomb007
    Commented Nov 10, 2018 at 1:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.