Twitter timeline produces invalid XHTML

Creating and modifying plugins.
Post Reply
shadowm
Posts: 3
Joined: Thu May 19, 2011 12:21 am

Twitter timeline produces invalid XHTML

Post by shadowm »

I just noticed that the latest version (1.34) of the Twitter timeline plugin in PHP output mode produces invalid XHTML for @replies, on Serendipity 1.5.5 and PHP 5.3.5; for example:

Code: Select all

<span> @<a href="http://twitter.com/username"class="twitter_user">username</a> This is a reply.</span>
There’s a blank missing between the href and class attributes. The following change to serendipity_plugin_twitter/classes/Twitter.php appears to fix it:

Line 420:

Code: Select all

$status = preg_replace('{@([\w_]*)}','@<a href="' . $this->get_base_url() . '$1"' . $class . '>$1</a>', $status);
Replace with:

Code: Select all

$status = preg_replace('{@([\w_]*)}','@<a href="' . $this->get_base_url() . '$1" ' . $class . '>$1</a>', $status);
(Just a forced blank preceding $class.)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Twitter timeline produces invalid XHTML

Post by garvinhicking »

Hi!

Great, thanks a lot for contributing this! I put your patch into CVS just now.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
seraphyn
Regular
Posts: 211
Joined: Fri Dec 01, 2006 8:42 am
Contact:

Re: Twitter timeline produces invalid XHTML

Post by seraphyn »

If it helps the PHP-Version on my Blog produces 22 Errors unvalid XTHML that the Javascript-Version does not.
If it's need I could switch on one more time the PHP-Version?

Greetings Chris

edit:
I'm using identi.ca only btw.
And the Date does not parse the notice with the number, it parses only http://identi.ca/notice/ for Dienstag, 18:29 24.05.2011 instead of: http://identi.ca/notice/74398049
Should I open another thread for this bugs?

Bugfix is in Forum Bugs.
Post Reply