Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
130
rated 0 times [  131] [ 1]  / answers: 1 / hits: 30780  / 11 Years ago, fri, january 24, 2014, 12:00:00

I want to embed a tweet in a GitHub README file. Markdown should support this, however when I add the code that is copied from the tweet the JavaScript doesn't get rendered.



Example:



<blockquote>...</blockquote>

<script async src=//platform.twitter.com/widgets.js charset=utf-8></script>



Any ideas?


More From » github

 Answers
2

Allowing javascript from third parties directly on a website has huge XSS attacks implications. Someone could use javascript code for example to grab the cookies associated to any visitor's github accounts and forward them to a malicious entity.



There's also the nuisance potential, as having access to javascript means having access to the CPU of the visitor and being able to do things like pop-ups or blinking text.



As such it's natural that javascript isn't supported in READMEs. Markdown may have a way of doing it, but it'll never be allowed on a website like GitHub.



However, you can do it on your project's github page, if you have one, since it doesn't belong to the main github website and the domain is not the same.


[#72958] Thursday, January 23, 2014, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
pariss

Total Points: 255
Total Questions: 99
Total Answers: 117

Location: Hungary
Member since Wed, Nov 9, 2022
2 Years ago
;