ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Search Results, text getting wrapped in HTML tags

July 16, 2014 12:34pm

Subscribe [2]
  • #1 / Jul 16, 2014 12:34pm

    clorentzen

    11 posts

    I’m having a weird problem with displaying search results that I can’t quite figure out. I have a bunch of text fields in a channel for displaying employee contact information. When I am listing the entries using a regular channel entries tag, everything displays as expected. But when I am displaying the results of searching this channel, the contents of each field is getting wrapped in a

    tag. No idea why.

    Here’s my search results code:

    {exp:search:search_results}
    <div class="results">
      <strong>{first_name} {last_name}</strong>
    
      {job_title}
    
      {business_unit}
    
      {job_location}
    
      {if work_phone}Tel {work_phone}
    {/if}
      {if cell_phone}{cell_phone}
    {/if}
      <a href="mailto:{work_email}">{work_email}</a>
    </div>
    {/exp:search:search_results}

    When the results are rendered, it’s coming out like this:

    <div class="results">
      <strong>Firstname Lastname</strong>
    
      Title Goes Here
    
      Department Name
    
      City
    
      Tel 000-000-0000
     
                    <a >[email protected]">[email protected]</a>
    </div>

    Thanks in advance for any help!

  • #2 / Jul 16, 2014 2:12pm

    clorentzen

    11 posts

    Just wanted to add/clarify that every field in this channel is a text input field, with default text formatting set to “none” (see attached image).

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases