How do I echo a GET variable inside Rails?
I've created an iFrame component to integrate into my sites. The IFrame needs to be passed the GET variable from the URL string when the page is loaded on the remote site. In this case, the parent page will be named http://www.theirsite.com/tracking=12345 and the tracking variable must be written to the html code on the remote page for the iframe when the page is rendered.
I've created code versions for every major language except rails. The PHP code version is shown below.
As a complete Rails neophyte, I hope someone can generate a similar XSS protected Rails snippet like htmlentities ().
I am posting code for people to grab and copy to their sites.
... src="mysite.com?tracking=<?php echo htmlentities($_GET['tracking']); ?>" ...
0
a source to share