Page 1 of 1

Twitter timeline produces invalid XHTML

Posted: Thu May 19, 2011 12:30 am
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.)

Re: Twitter timeline produces invalid XHTML

Posted: Sun May 22, 2011 2:30 pm
by garvinhicking
Hi!

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

Regards,
Garvin

Re: Twitter timeline produces invalid XHTML

Posted: Tue May 24, 2011 9:58 pm
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.