Why does the HTML I paste into a "text widget" get altered when I save it?

  • Unknown's avatar

    When I copy and paste HTML language from the tripadvisor widget site to my sidebar on my website using a “text widget” it deletes some of the info and the widget does not function properly.

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi there,

    Would you mind pasting the embed code from tripadvisor here for me to take a look?

    Please begin and end the code with backticks (`) to make sure it formats properly in this forum.

    Some embed codes will not work because we do not allow certain tags on WordPress.com for security reasons, including JavaScript, Flash, iframe, form, and input tags.

    These restrictions are in place to prevent any disruptions in service due to potentially malicious code.

    You can read more about this here:

    Code

    Best,

    -Alex G.

  • Unknown's avatar

    here you go…
    :'<div id=”TA_rated123″ class=”TA_rated”>
    <ul id=”mxNkZ2″ class=”TA_links SnTqqRFaT”>
    <li id=”w4mzggPx” class=”LQOpqyN”>
    <img src=”http://www.tripadvisor.com/img/cdsi/img2/badges/ollie-11424-2.gif” alt=”TripAdvisor”/>

    </div>
    <script src=”http://www.jscache.com/wejs?wtype=rated&uniq=123&locationId=4561122&lang=en_US&display_version=2″></script>:’

  • Unknown's avatar

    Yes, that embed will not work for the reasons I described earlier. It uses the ‘script’ tag, and those are scraped out for the security of the WordPress.com environment.

    This is described in further detail here:

    Code

    I do apologize for the frustration.

    As a substitution, I would recommend finding a TripAdvisor logo you prefer, and using that image inside an Image Widget:

    http://en.support.wordpress.com/widgets/image-widget/

    In the “Link URL” setting of that image widget, provide the URL to your business on TripAdvisor.

    Best,

    -Alex G.

  • The topic ‘Why does the HTML I paste into a "text widget" get altered when I save it?’ is closed to new replies.