Skip Menu |

This queue is for tickets about the WWW-Myspace CPAN distribution.

Report information
The Basics
Id: 35703
Status: resolved
Priority: 0/
Queue: WWW-Myspace

People
Owner: Nobody in particular
Requestors: steven [...] pyro.eu.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: user_name test fails; patch included
Date: Wed, 07 May 2008 23:33:04 +0100
To: bug-www-myspace [...] rt.cpan.org
From: Steven Chamberlain <steven [...] pyro.eu.org>
Hi, My test account has a display name of "TestDisplayName" but MySpace now show this as "TestDisp<wbr/>layName" in the HTML of the 'user home' page. That isn't a real HTML tag, so it's either a typo, or MySpace have decided to make up their own HTML tags now. I think its purpose is to allow the display name to break onto the next line. This was causing the user_name test in t/01-login.t to fail. My attached patch strips out this tag if present, and it should still work if they ever change it to <br/> in the future. Regards, -- Steven Chamberlain steven@pyro.eu.org
Index: lib/WWW/Myspace.pm =================================================================== --- lib/WWW/Myspace.pm (revision 578) +++ lib/WWW/Myspace.pm (working copy) @@ -1378,6 +1378,11 @@ # $line =~ s/\+/ /g; # $line =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $self->{user_name} = $2; + + # 2008-04-14 -- have noticed Myspace inserting <wbr/> randomly + # in the middle of the user's name on the homepage; these need to + # be stripped out + $self->{user_name} =~ s/<wbr\/>//ig; } }
Subject: Re: [rt.cpan.org #35703] AutoReply: user_name test fails; patch included
Date: Thu, 08 May 2008 00:06:32 +0100
To: bug-WWW-Myspace [...] rt.cpan.org
From: Steven Chamberlain <steven [...] pyro.eu.org>
Oops, The attachment to the previous message was slightly out-of-date. The patch I'm attaching now should be a bit more robust. Regards, -- Steven Chamberlain steven@pyro.eu.org
Index: lib/WWW/Myspace.pm =================================================================== --- lib/WWW/Myspace.pm (revision 578) +++ lib/WWW/Myspace.pm (working copy) @@ -1378,6 +1378,11 @@ # $line =~ s/\+/ /g; # $line =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $self->{user_name} = $2; + + # 2008-04-14 -- have noticed Myspace inserting <wbr/> randomly + # in the middle of the user's name on the homepage; these need to + # be stripped out + $self->{user_name} =~ s/<w?br\s?\/>//ig; } }
On Wed May 07 19:06:40 2008, steven@pyro.eu.org wrote: Show quoted text
> Oops, > > The attachment to the previous message was slightly out-of-date. The > patch I'm attaching now should be a bit more robust. > > Regards,
Hi Steven, Thanks very much! Your patch has been applied and will be included in the next release. All the best, Olaf