Putting HTML from outside sources into my blog

Discussion in 'HTML & Website Design' started by happydz, Dec 26, 2015.

  1. #1
    I've read that putting HTML/JAVASCRIPT codes from 3rd parties sites that are not integrated with (eg Paypal, Flickr,Amazon...) into my blog enables them to truck and hack my blog .
    Sometimes I have to put html/javascript codes from 3rd parties sites because these codes are useful.
    Please guys tell me if there's a way out there that let me know if the code from 3rd parties sites are risky or not?
    Thank you in advance
    My regards
     
    happydz, Dec 26, 2015 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    Yes. You look at the code, understand what it does, and then make a decision. If you don't understand the code, don't use it.

    However: third party html cannot hurt your page directly. Html is "dumb", and the worst thing that can happen is a link to an external page with malicious code. Javascript is a whole different matter, and should be used with caution.
     
    PoPSiCLe, Dec 26, 2015 IP
  3. happydz

    happydz Greenhorn

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #3
    Thank you for you feedback
    I'm newbie in programming and I don't understand everything, yesterday I tried to put some html codes of social media buttons I tried to understand how these codes work but I couldn't. Take a look at this code for example:

    [​IMG]
    note the lines 6 and 9 I can not trust this site because I think they have made a tool (script or something) to truck users like me.
    so the question is how can I know if the code is safe ot risky and put it into my blog or site
     
    happydz, Dec 26, 2015 IP
  4. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #4
    Of course providers of such tools might include tracking to see if there's a large userbase. I don't know the company, so I can't tell you if they're okay or not, but the javascript file is in plain text, and if you look at it, you would be able to see if there is any malicious code.
    However, if this is a reputable plugin provider, you're probably safe. Most social media buttons need a bit of code running to provide the necessary connections to the site in question.
     
    PoPSiCLe, Dec 26, 2015 IP
  5. COBOLdinosaur

    COBOLdinosaur Active Member

    Messages:
    515
    Likes Received:
    123
    Best Answers:
    11
    Trophy Points:
    95
    #5
    Malicious or not the quality of the code is questionable. An element that needs 4 CSS class and then still adds inline styling was written by either an idiot or a wannabe pretending to be a developer. The code is crap and crap does not belong on a web site.

    If you are going to do web sites then learn enough of the basics so you can write your own code and not have to rely on garbage. 90% of the free stuff on the internet is crap; 20% is infected with malicious code and none of it will do anything but reduce the technical quality of a site. If you do not have enough mastery of the basics to be able to evaluate the trash collections you should be learning to do your own code instead of gamboling on mystery code from an unknown author who may or may not have malicious intent.
     
    COBOLdinosaur, Dec 27, 2015 IP