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, one 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

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
    That's a creative idea. Nice. I'll take a look on Monday. – mbomb007 Nov 10 '18 at 1:49
  • @mbomb007 Did this solve your issue? – komlenic Dec 12 '18 at 20:22
  • I didn't use the solution. I don't remember what I did do, though, or even what it was for. – mbomb007 Dec 12 '18 at 21:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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