We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

URL in channel field displaying incorrectly

How Do I?

rjionline's avatar
rjionline
37 posts
10 years ago
rjionline's avatar rjionline

I have created two channel fields for a channel. The first is called source — meaning the name of the source publication the entry is quoting — and the second is called source_url, the URL to the source publication.

Here’s the code in the template.

<div class="col-xs-12"><a href="http://{source_url}">{source}</a></div>

Here’s the source code from the webpage the template generates.

<div class="col-xs-12">
<a href="http://a">http://www.rjionline.org/</a>
">RJI online
</div>

The default text formatting for the text input field that contains the URL is set to none.

I have no idea why this is happening. Any suggestions?

Thanks.

L.

       
jay_turley's avatar
jay_turley
46 posts
10 years ago
jay_turley's avatar jay_turley

I just tested this with this template code:

<ul>
{exp:channel:entries channel="sources" disable="categories|member_data|pagination"}
<li><a href="http://{source_url}">{source}</a></li>
{/exp:channel:entries}
</ul>

and channel fields of source and source_url with Text Inputs and Default Text Formatting set to “none”.

I had no problem getting these to display, so I’m guessing there is something strange going on either in your template or in your channel fields. I’d just check them again; maybe delete and recreate them?

Wish I could be of more help but I’m new and still learning.

       
rjionline's avatar
rjionline
37 posts
10 years ago
rjionline's avatar rjionline

Thanks. I tried that, but it didn’t help.

L.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.