[wp-trac] Re: [WordPress Trac] #3495: Pingback excerpt-fetching
code looks for a link to the SOURCE site instead of the TARGET site.
WordPress Trac
wp-trac at lists.automattic.com
Sat Dec 23 10:32:42 GMT 2006
#3495: Pingback excerpt-fetching code looks for a link to the SOURCE site instead
of the TARGET site.
-------------------------+--------------------------------------------------
Reporter: markjaquith | Owner: markjaquith
Type: defect | Status: assigned
Priority: high | Milestone: 2.1
Component: XML-RPC | Version: 2.0.5
Severity: normal | Resolution:
Keywords: |
-------------------------+--------------------------------------------------
Changes (by markjaquith):
* status: new => assigned
* owner: anonymous => markjaquith
* milestone: 2.0.6 => 2.1
Comment:
Uploaded: {{{pingback_excerpt.001.diff}}}
* use {{{preg_quote()}}} instead of wacky manual escaping
* use the target URL for context
* mark the link text to prevent more than one occurrence of that string
from interfering
* make the context-finding regex lazy
* trim link text if it is more than 100 characters long
There. Now that should be functioning like it was intended to function.
You get a nice excerpt with an absolute upper limit of 300 chars instead
of the 1000+ char monstrosities that frequently showed up with the broken
code.
I'll let this sit a day or two for auditing.
--
Ticket URL: <http://trac.wordpress.org/ticket/3495#comment:1>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list