367 views
1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5.00 out of 5)
Loading ... Loading ...

12.05.08

A Big Space in between Firefox and Internet Explorer

Posted in Blogroll, News, Tech at 4:08 pm by liviu.tudor View Liviu Tudor's profile on LinkedIn

For those of you who tried to put together a “flatten” function cross browser to eliminate consecutive spaces and/or trim some text that is retrieved from the HTML page itself, you might have noticed that a simple regex of the kind

/\s+/gm

is simply not enough and occasionally Internet Explorer would still return a string with multiple consecutive space characters! The reason for that is that Internet Explorer does NOT treat
(non-breaking spaces) as a space — and therefore the \s won’t match it! In order to include this in your match, look at W3C list of HTML entities, and it transpires that is the same as — in other words 160 is the decimal code for this character (which is A0 in hex by the way). So to include this when searching for spaces, your regex now becomes:

/(\s|\xA0)+/gm

and you’ll notice that now you “catch” the non-breaking spaces in IE as well as Firefox (which does the right thing and treats the non-breaking spaces as proper spaces) — yahoo!

Disclaimer

210 views
1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5.00 out of 5)
Loading ... Loading ...

11.05.08

Phantoms RFC Got a New Site!

Posted in News, Rugby at 11:26 am by liviu.tudor View Liviu Tudor's profile on LinkedIn

It’s here — it’s beeing built from scratch, but it rocks! Phantoms RFC new website can be found here: www.phantomsrfc.com.

Disclaimer

520 views
1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 4.33 out of 5)
Loading ... Loading ...

Brilliant Romanian Rugby Site

Posted in News, Rugby at 11:11 am by liviu.tudor View Liviu Tudor's profile on LinkedIn

For those of you who still think Romanian rugby is non-existent, here’s the proof that’s not the case: this is the first rugby-only Romanian site that I know of: www.rugby.ro — it has live scores, news about the players (unfortunately most of the national squad as it turns out plays abroad!) and tons of other stuff.

Disclaimer

Interesting site about getting Londoners chatting during their daily commute I Can Talk, Me!