HTML in blog post changing

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dougdirac
    Senior Member
    • Jul 2012
    • 425
    • 4.2.X

    [Blog] HTML in blog post changing

    We have an event going on today and I'm trying to embed a twitter widget into a blog post.

    The code I trying to embed is this:
    HTML Code:
    <a class="twitter-timeline" href="https://twitter.com/TeslaRoadTrip" data-widget-id="302689062492438528">Tweets by @TeslaRoadTrip</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
    When I save the post, what i'm supposed to see does not show up, even after refreshing the page. I then go to edit the post and what I want (sometimes) is visible in the WSYIWYG edit plane. But if I save again, it doesn't show in the actual post. If I then switch the editor to source mode. I see the HTML has changed to this:

    HTML Code:
    <iframe id="twitter-widget-0" class="twitter-timeline twitter-timeline-rendered" scrolling="no" frameborder="0" allowtransparency="true" style="border: none; max-width: 100%; min-width: 220px;" title="Twitter Timeline Widget" width="520" height="400"></iframe>
    <script id="twitter-wjs" src="//platform.twitter.com/widgets.js"></script><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
    So what's going on and how do I get it to work? Why does it only work momentarily in the editor?

    Thanks.

    - - - Updated - - -

    Still curious if someone knows why vB rewrites the HTML like that. At any rate, I got it to work by putting the code in an html file hosted on my site and using an iframe to call it.

    You can see the result here: http://www.teslamotorsclub.com/entry...-quot-Roadtrip
    Last edited by dougdirac; Sat 16 Feb '13, 7:18pm.
  • dougdirac
    Senior Member
    • Jul 2012
    • 425
    • 4.2.X

    #2
    Still no response here? Please help. I have a related problem and haven't found a work around this time. I'm trying to embed a video in a blog post using this code:

    HTML Code:
    <iframe src="http://embed.ted.com/talks/elon_musk_the_mind_behind_tesla_spacex_solarcity.html" width="100%" height="400" frameborder="0" scrolling="no" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""></iframe>
    In the editor view it works. (umm... how to I get inline images with vB5?... see pics below)
    In the published blog it doesn't work. Looking at the html of the page it looks like vB changed the code to this:

    HTML Code:
    <iframe src="http://embed.ted.com/talks/elon_musk_the_mind_behind_tesla_spacex_solarcity.h  tml" width="100%" height="400" frameborder="0" scrolling="no" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""></iframe>

    For some reason it added a space in the URL, thus breaking it. I.e., "...html" became "...h tml". What the heck is going? I've seen something similar happen before. How do I fix it? My blog post is time sensitive, so a prompt reply would be appreciated.


    Comment

    • Mark.B
      vBulletin Support
      • Feb 2004
      • 24288
      • 6.0.X

      #3
      This is being looked at by ticket.
      MARK.B
      vBulletin Support
      ------------
      My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
      My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

      Comment

      • BirdOPrey5
        Senior Member
        • Jul 2008
        • 9613
        • 5.6.3

        #4
        Looks like Word Wrapping is wrapping the code when it shouldn't be... Try shutting off automatic word wrapping in Admin CP settings and see if you can get it to work with it off. If so at least we'll know the root of the issue.

        Comment

        • dougdirac
          Senior Member
          • Jul 2012
          • 425
          • 4.2.X

          #5
          Sorry, for the late reply. IIRC I just set it to wrap at a much larger number. And that fixed the issue.

          Comment

          • dougdirac
            Senior Member
            • Jul 2012
            • 425
            • 4.2.X

            #6
            OMG, btw just I tried to look at those images a posted above and it broke my browser. With the picture showing, my window scrollbars no longer worked.

            Comment

            Related Topics

            Collapse

            Working...