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
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.
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: 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
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.
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.