[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

unescapeHTML

Santi

5/11/2006 11:28:00 PM

Hi,

I need to decode escaped html entities but the following code is not
working:

--
require 'cgi'
print CGI.unescapeHTML('&eacute')
--

It prints "&eacute" insted of the expected e with the acute.

What's wrong?

Thank you.

48 Answers

Chris Hulan

5/12/2006 4:35:00 AM

0

Looking at the source, it doesn't seem to expect that particular code.
Infact it only handles <, >, " and &.

Dave Burt

5/12/2006 6:07:00 AM

0

Santi wrote:
> Hi,
>
> I need to decode escaped html entities but the following code is not
> working:
>
> --
> require 'cgi'
> print CGI.unescapeHTML('&eacute')
> --
>
> It prints "&eacute" insted of the expected e with the acute.
>
> What's wrong?

CGI.unescapeHTML is designed to be the inverse of CGI.escapeHTML, which
is only designed to escape characters that are valid 7-bit ASCII but not
valid CDATA in HTML.

What do you want this for? You might have to build your own lookup table
to convert these into the character encoding you desire.

Cheers,
Dave

Maria

12/20/2010 11:27:00 AM

0

On 20/12/2010 11:21, Mrcheerful wrote:
> Maria wrote:
>> On 20/12/2010 11:16, Maria wrote:
>>> Now my laptop has packed up completely (dead as a dodo, less than 2
>>> years old and this is the second time). We are now on our fourth
>>> X-box in three years (the last two we only got replaced because we
>>> coughed up for insurance).
>>>
>>> How can this be sustainable? Makes carbon credits and green taxes
>>> look like a sick joke.
>>>
>>> There must be room for a british manufacturer in this area - I see
>>> many people are sick of it as I am, in addition to those who wish to
>>> buy electricals from factories where people don't hang themselves.
>>
>> If anyone has any tips on what 'brand' to buy next that might last a
>> bit longer, please feel free. This was a Sony Vaio.
>
> panasonic make the best laptop
>
>

Bloody hell. You really do have to pay a lot of money for something that
lasts these days.

Mrcheerful

12/20/2010 11:31:00 AM

0

Maria wrote:
> On 20/12/2010 11:21, Mrcheerful wrote:
>> Maria wrote:
>>> On 20/12/2010 11:16, Maria wrote:
>>>> Now my laptop has packed up completely (dead as a dodo, less than 2
>>>> years old and this is the second time). We are now on our fourth
>>>> X-box in three years (the last two we only got replaced because we
>>>> coughed up for insurance).
>>>>
>>>> How can this be sustainable? Makes carbon credits and green taxes
>>>> look like a sick joke.
>>>>
>>>> There must be room for a british manufacturer in this area - I see
>>>> many people are sick of it as I am, in addition to those who wish
>>>> to buy electricals from factories where people don't hang
>>>> themselves.
>>>
>>> If anyone has any tips on what 'brand' to buy next that might last a
>>> bit longer, please feel free. This was a Sony Vaio.
>>
>> panasonic make the best laptop
>>
>>
>
> Bloody hell. You really do have to pay a lot of money for something
> that lasts these days.

and that is the difference, you get what you pay for. I have two hp laptops
here which are less than two years old and beyond economic repair (other
people's, not my own)
there are good secondhand panasonic ones to be had, my CF72 was less than a
hundred quid from ebay and works fine, runs anything I have ever needed.


Mel Rowing

12/20/2010 11:40:00 AM

0

On Dec 20, 11:20 am, Maria <d...@heel.org.uk> wrote:
> On 20/12/2010 11:16, Maria wrote:
>
> > Now my laptop has packed up completely (dead as a dodo, less than 2
> > years old and this is the second time). We are now on our fourth X-box
> > in three years (the last two we only got replaced because we coughed up
> > for insurance).
>
> > How can this be sustainable? Makes carbon credits and green taxes look
> > like a sick joke.
>
> > There must be room for a british manufacturer in this area - I see many
> > people are sick of it as I am, in addition to those who wish to buy
> > electricals from factories where people don't hang themselves.
>
> If anyone has any tips on what 'brand' to buy next that might last a bit
> longer, please feel free. This was a Sony Vaio.

Last one I had lasted 18 months. Before that Tosh suffered a complete
MB failure after about 6 moths (Got a refund for that one!)

Since then I'm on my 2nd Acer. The first still works fine but the key
board sticks on several keys. I've removed cleaned and refitted
individual keys a couple of times but now with no effect - knackered
after 4 years but mind you I get use from them.

Grandaughter's HP laptop packed up 2 or 3 weeks ago after 4 years (she
hammers them too) - BIOS chip can't find OS.



Maria

12/20/2010 11:43:00 AM

0

On 20/12/2010 11:31, Mrcheerful wrote:
> Maria wrote:
>> On 20/12/2010 11:21, Mrcheerful wrote:
>>> Maria wrote:
>>>> On 20/12/2010 11:16, Maria wrote:
>>>>> Now my laptop has packed up completely (dead as a dodo, less than 2
>>>>> years old and this is the second time). We are now on our fourth
>>>>> X-box in three years (the last two we only got replaced because we
>>>>> coughed up for insurance).
>>>>>
>>>>> How can this be sustainable? Makes carbon credits and green taxes
>>>>> look like a sick joke.
>>>>>
>>>>> There must be room for a british manufacturer in this area - I see
>>>>> many people are sick of it as I am, in addition to those who wish
>>>>> to buy electricals from factories where people don't hang
>>>>> themselves.
>>>>
>>>> If anyone has any tips on what 'brand' to buy next that might last a
>>>> bit longer, please feel free. This was a Sony Vaio.
>>>
>>> panasonic make the best laptop
>>>
>>>
>>
>> Bloody hell. You really do have to pay a lot of money for something
>> that lasts these days.
>
> and that is the difference, you get what you pay for. I have two hp laptops
> here which are less than two years old and beyond economic repair (other
> people's, not my own)
> there are good secondhand panasonic ones to be had, my CF72 was less than a
> hundred quid from ebay and works fine, runs anything I have ever needed.
>

There's one on Ebay for 80 quid, but the RAM and hard drive is too small
really - I do a lot of photography and have to keep rebooting if it's
too small, and make a special effort to manage my photos, though I
suppose I can upgrade the RAM possibly - I don't know how upgradeable
these things are,

The only others on there are from the US (refurbished) and nearly 400 quid!

Maria

12/20/2010 11:47:00 AM

0

On 20/12/2010 11:40, Mel Rowing wrote:
> On Dec 20, 11:20 am, Maria<d...@heel.org.uk> wrote:
>> On 20/12/2010 11:16, Maria wrote:
>>
>>> Now my laptop has packed up completely (dead as a dodo, less than 2
>>> years old and this is the second time). We are now on our fourth X-box
>>> in three years (the last two we only got replaced because we coughed up
>>> for insurance).
>>
>>> How can this be sustainable? Makes carbon credits and green taxes look
>>> like a sick joke.
>>
>>> There must be room for a british manufacturer in this area - I see many
>>> people are sick of it as I am, in addition to those who wish to buy
>>> electricals from factories where people don't hang themselves.
>>
>> If anyone has any tips on what 'brand' to buy next that might last a bit
>> longer, please feel free. This was a Sony Vaio.
>
> Last one I had lasted 18 months. Before that Tosh suffered a complete
> MB failure after about 6 moths (Got a refund for that one!)
>
> Since then I'm on my 2nd Acer. The first still works fine but the key
> board sticks on several keys. I've removed cleaned and refitted
> individual keys a couple of times but now with no effect - knackered
> after 4 years but mind you I get use from them.
>
> Grandaughter's HP laptop packed up 2 or 3 weeks ago after 4 years (she
> hammers them too) - BIOS chip can't find OS.
>

I was thinking of an Acer or HP - I can buy them down the road instead
of having to do it online and wait for delivery. Perhaps I won't bother.
The computer I am a using now is a 1999 Dell - bit slow but it's been
dead reliable. Does anyone know if Dell laptops are any good these days?
My daughter had one and all the keys ended up catapaulting out all over
the place, as well as it eating batteries and chargers.





Ophelia

12/20/2010 11:56:00 AM

0



"Maria" <down@heel.org.uk> wrote in message
news:vvKdnTwIDcOu35LQnZ2dnUVZ8sCdnZ2d@bt.com...
> On 20/12/2010 11:40, Mel Rowing wrote:
>> On Dec 20, 11:20 am, Maria<d...@heel.org.uk> wrote:
>>> On 20/12/2010 11:16, Maria wrote:
>>>
>>>> Now my laptop has packed up completely (dead as a dodo, less than 2
>>>> years old and this is the second time). We are now on our fourth X-box
>>>> in three years (the last two we only got replaced because we coughed up
>>>> for insurance).
>>>
>>>> How can this be sustainable? Makes carbon credits and green taxes look
>>>> like a sick joke.
>>>
>>>> There must be room for a british manufacturer in this area - I see many
>>>> people are sick of it as I am, in addition to those who wish to buy
>>>> electricals from factories where people don't hang themselves.
>>>
>>> If anyone has any tips on what 'brand' to buy next that might last a bit
>>> longer, please feel free. This was a Sony Vaio.
>>
>> Last one I had lasted 18 months. Before that Tosh suffered a complete
>> MB failure after about 6 moths (Got a refund for that one!)
>>
>> Since then I'm on my 2nd Acer. The first still works fine but the key
>> board sticks on several keys. I've removed cleaned and refitted
>> individual keys a couple of times but now with no effect - knackered
>> after 4 years but mind you I get use from them.
>>
>> Grandaughter's HP laptop packed up 2 or 3 weeks ago after 4 years (she
>> hammers them too) - BIOS chip can't find OS.
>>
>
> I was thinking of an Acer or HP - I can buy them down the road instead of
> having to do it online and wait for delivery. Perhaps I won't bother.
> The computer I am a using now is a 1999 Dell - bit slow but it's been dead
> reliable. Does anyone know if Dell laptops are any good these days?
> My daughter had one and all the keys ended up catapaulting out all over
> the place, as well as it eating batteries and chargers.

I've had this Inspiron for a couple of years and it is still good. The
best I had was a Compaq. It still gets used, the only prob was the usb
ports died.
--
--
https://www.shop.helpforhero...

Bob Mitchel

12/20/2010 12:06:00 PM

0


"Maria" <down@heel.org.uk> wrote in message
news:DbSdnVpLRp-RoZLQnZ2dnUVZ8k-dnZ2d@bt.com...
> On 20/12/2010 11:16, Maria wrote:
> > Now my laptop has packed up completely (dead as a dodo, less than 2
> > years old and this is the second time). We are now on our fourth X-box
> > in three years (the last two we only got replaced because we coughed up
> > for insurance).
> >
> > How can this be sustainable? Makes carbon credits and green taxes look
> > like a sick joke.
> >
> > There must be room for a british manufacturer in this area - I see many
> > people are sick of it as I am, in addition to those who wish to buy
> > electricals from factories where people don't hang themselves.
>
> If anyone has any tips on what 'brand' to buy next that might last a bit
> longer, please feel free. This was a Sony Vaio.

I have got a Dell Inspiron 6000, and its about six years old now. Been used
daily, and it keeps on going Maria. Not sure if I have just been lucky,
but its not been a bit of trouble. Infact the original battery was good
until last year, and I have just replaced the battery for the first time. I
can recommend Dell, unless the newer ones are cheaper build quality (as I
dont have experience with the latest ones).


strassenbaum

12/20/2010 12:07:00 PM

0

On 20/12/10 11:20, Maria wrote:
> On 20/12/2010 11:16, Maria wrote:
>> Now my laptop has packed up completely (dead as a dodo, less than 2
>> years old and this is the second time). We are now on our fourth X-box
>> in three years (the last two we only got replaced because we coughed up
>> for insurance).
>>
>> How can this be sustainable? Makes carbon credits and green taxes look
>> like a sick joke.
>>
>> There must be room for a british manufacturer in this area - I see many
>> people are sick of it as I am, in addition to those who wish to buy
>> electricals from factories where people don't hang themselves.
>
> If anyone has any tips on what 'brand' to buy next that might last a bit
> longer, please feel free. This was a Sony Vaio.

My thinkpad T23 from Ebay in 2004 is still going strong - gets fairly
heavy use and has been dropped. 1.2 Ghz might be a bit slow for you now,
but what about the thinkpad T42?