List Info

Thread: Sidebar clipping broken




Sidebar clipping broken
user name
2006-09-11 16:53:44
Simon,
 
Confirmed: The broken HTML tags in the snips issue is solved in RC2.
 
This problem remains:
 
- Wiki tags appear unaltered in snips.
 
This is another manifestation of the problems with the clipping algorithm I just found:
 
- A post with no (not enough) text (like the one with only an image at http://www.neogeny.org/blog/) makes the snip include the "Tags:" section of the post. See the snip for "Dead Fish" at my blog.
 
Juanco


From: Simon Brown [mailto:simongbrowngmail.com]
Sent: Monday, September 11, 2006 12:07 PM
To: Juancarlo Aņez
Subject: Re: [pebble-user] Sidebar clipping broken

I fixed your issues in RC2 - please give this a try and let me know if you still find problems.
 
Thanks
Simon

 
On 9/11/06, Juancarlo Aņez <suigeneris.org">juancasuigeneris.org> wrote:
Simon,
 
Sorry for the omission. The version is still 2.0-RC1, and yes, the problems are in addition to the ones I reported earlier.
 
I was thinking about how to solve this particular problem, and I think that a solution to this and other problems would involve these steps:
 
1- Render the post as it is done for "Preview"
2- Parse the HTML.
3- Traverse the HTML DOM elements concatenating their toString()s until the threshold for the snippet is reached,maybe skipping elements dangerous for the page rendering like <img>;, and unwrapping others like <div>;.
 
This process is expensive, so it shold be performed at the time of "Save", saving the clip along with the post.
 
I'm short on time right now, but if you point me to the set of classes in charge of the clips I'll take a look.
 
I think that doing the parsing for automated clips is unavoidable because it is the only way to avoid splitting a tag like <img ....> in the middle.
 
Another alternative is to require there be an "exceprt" to bue use complete as the clip. Yet, if this option was taken, I'd need an option to have a post be rendered as excerpt+body on the Home page (as it is, only the excerpt is presented).
 
Juanco


From: Simon Brown [mailto:gmail.com" target=_blank>simongbrowngmail.com]
Sent: Monday, September 11, 2006 07:46 AM
To: Juancarlo Aņez
Subject: Re: [pebble-user] Sidebar clipping broken

&nbsp;
Which version are you using? Is this in addition to the problems you reported last time?

On 9/11/06, Juancarlo Aņez <suigeneris.org" target=_blank>juancasuigeneris.org > wrote:

The sidebar snippet clipping algorithm will split the post in the middle of
html tags, potentially making the rendering of the whole page a disaster.

See http://www.neogeny.org/blog/, and the rendering of the sidebar under the
"Black and White" recent post.

Juanco

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )