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.

passing xhtml to embeds

April 01, 2011 9:06am

Subscribe [5]
  • #1 / Apr 01, 2011 9:06am

    _Oli

    56 posts

    Hello,

    I seem to be having a weird issue and after looking through the forums, I can’t find anything similar…

    I’m trying to pass values to an embed but for some reason links in my field content seem to break. I have the latest build/version of ee2 installed.
    I have stripped all html from the templates and I’m only testing the tags.
    Here are the templates:

    Main template:

    {exp:channel:entries channel="advertorial" limit="1"}
    {embed="news/inner" title="{title}" test_field="{test_field}" advertorial_article="{advertorial_article}"}
    {/exp:channel:entries}

    test_field is a normal textarea field with xhtml formatting on.
    advertorial_article is a Wygwam field.

    Embeded Template:

    <h1>{embed:title}</h1>
    <h2>Wygwam field</h2>
    <p>{embed:advertorial_article}</p><h2>Default field</h2>
    <p>{embed:test_field}

    If test_field or advertorial_article contain only paragraph or headings or any simple html tags, all is fine. If I add a link to the content (simple a tag) here what the result source looks like: http://oli.gd/5fYA

    Anyone experienced this before?

  • #2 / Apr 01, 2011 9:14am

    Joobs

    362 posts

    have you tried turning off “automatically turning urls into links” and resaving the entry?

  • #3 / Apr 01, 2011 9:15am

    Est Digital

    62 posts

    Have you tried to use single quotes?
    advertorial_article=’{advertorial_article}’

  • #4 / Apr 01, 2011 9:19am

    _Oli

    56 posts

    Joobs - Yup first thing I did. No fix..
    Piet - Genius… That was the fix… I can’t believe it was such a simple issue.

    Thank you both for for the quick response!

    Have a good day

  • #5 / Apr 01, 2011 5:49pm

    Sue Crocker

    26054 posts

    Thanks for the assist, Joobs and Piet.

    _Oli, Feel free to start a new thread if you have any more questions.

  • #6 / Apr 02, 2011 8:52am

    webdeveloper

    11 posts

    I had the exact same issue here, same solution too.

    http://ellislab.com/forums/viewthread/157090/

  • #7 / Apr 05, 2011 4:41pm

    Sue Crocker

    26054 posts

    Sounds like everybody is working.. Feel free to start a new thread if you have any more questions.

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

ExpressionEngine News!

#eecms, #events, #releases