0

I have a text field type, that I'd like to be able to include links within. It appears that all of the formatters should be able to do this by default, and that the full/filtered html formatters should be able to handle html tags. However, for some reason, my text field is not doing either of these things. Links are simply appearing as plain text.

I think that they did work before, although I can't exactly remember where else in the site these filters are used to double-check, but they are no longer honoring links or html. Additionally, if full/filtered html is selected, then any html tags are hidden from view but are not being applied to the text. This leads me to believe that the formatter is recognizing the tags, but for some reason is failing to process them. Any suggestions?

So, just in case I wasn't clear at all:

  • Links are displaying as plain text (e.g. typing in http://www.google.com simply renders as http://www.google.com - plain text, no link). This is occurring with all formatters, including the "Plain Text" formatter, even when "Convert URLs into links" is selected. This is occurring with email addresses as well.
  • All html tags are being ignored (e.g. entering <a href="http://www.google.com">Google</a> or <a href="/local/links">Local Link</a> displays only as Google or Local Link, without rendering the link. Additionally, something like <strong>Bold</strong> renders as Bold, without the style applied).

1 Answer 1

1

It's hard to suggest a solution without examples, but I'd suggest you check the order of your text format filters (/admin/config/content/formats/full_html) and see if:

  1. Convert URLs into links is still turned on
  2. There are no additional filters acting on links or <a> tags that would cause them to be killed or hidden
  3. Make sure your links look like links! Obscure ones like bit.ly/4321 or even google.com won't get picked up. If they aren't getting picked up, adding http:// to the front of it normally triggers the auto URL filter.

If that doesn't work, see if you can post some example code. If we can see how they are being hidden, we might be able to assist better.

4
  • 1
    If it's relevant, I've also realized that links are not being converted when "plain text" is selected either. 1. Yes, convert URLs into links is still turned on for all types. 2. I don't see any other filters affecting the <a> tag or any other tags. 3. The links are prefaced with http:// except for if the link is a local path, in which case it does or does not start with a leading slash. I'd be happy to post some example code, but which code are you referring to?
    – Mrweiner
    Commented Jul 20, 2012 at 0:01
  • Not sure what's causing it right now. Probably an example of how it's being output vs the raw text or html you are putting in would be useful. If you can provide a list of the filters you have turned on that might help too. Commented Jul 20, 2012 at 4:01
  • I edited the original issue earlier to help clarify input vs. output. As for filters, the issue is happening with all formats no matter which filters are enabled. For example, in Full HTML I have "Convert line breaks into HTML (i.e. <br> and <p>)", "Convert URLs into links", and "Correct faulty and chopped off HTML." However, the problem persists even if I disable all filters, or all filters except for "Convert URLs into links." I also just realized that the issue may have started to occur after migrating my 7.12 dev site onto my 7.14 server. Could this be part of the problem?
    – Mrweiner
    Commented Jul 20, 2012 at 8:00
  • Gah, turns out that for some reason, Display Suite had the fields set as plain text. Don't know how! I'll give you the answer anyway. :)
    – Mrweiner
    Commented Jul 21, 2012 at 1:10

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.