No announcement yet.

HTML in blog post changing

  • Filter
  • Time
  • Show
Clear All
new posts

  • [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="" 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.src="//";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="//"></script><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);;js.src="//";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?


    - - - 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:
    Last edited by dougdirac; Sat 16 Feb '13, 7:18pm.

  • #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="" 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="  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.


    • #3
      This is being looked at by ticket.

      TalkNewsUK - My vBulletin 5.6.4 Demo
      AdminAmmo - My Cloud Demo


      • #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.


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


          • #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.


            Related Topics