Opening parsed 'source' in _blank window


#1

Hi,

I have parsed the ‘source’ from my Twitter statuses and have noticed that it automatically adds the links, i.e. ‘Twitter for iPhone’, ‘Tweetdeck’ etc…

While this is great, it doesn’t allow me to add the (target="_blank") section into my anchors.

I really want to be able to open these links on a blank page, not in the same page.

How would I go about this?

Regards…,

MT


#2

Got it sorted.

I placed

before the closing ‘head’ tag of my page.

Regards…,

MT


#3

But still: Why does this field contain HTML code? Every dev not using HTML / JavaScript has to parse / grep the relevant info from this field…
Why don’t you send something like

source: {
name: “Twitter for iPhone”,
url: “http://twitter.com
}

which would make working with those values much, much easier.


#4

This is for historical reasons primarily and due to the stark reality of how the majority of developers will render Twitter-based content: on the web, with little to no sanitization.


#5