Fixes to "first_chars" / "cut_first" parameters

1 view
Skip to first unread message

Alexander Obuhovich

unread,
Nov 17, 2009, 1:21:20 PM11/17/09
to In-Portal Bugs
Currently  "first_chars" / "cut_first" parameters are used to show only first N characters of string. In case if string contains HTML, then it could result in broken html. We should use strip_tags function, before applying any string cutting.

--
Best Regards,

http://www.in-portal.org
http://www.alex-time.com

Dmitry A.

unread,
Nov 18, 2009, 1:41:00 PM11/18/09
to In-Portal Bugs
I think the problem is that we'll be loosing the actual formating on
that field if we do "stript_tags", correct?

DA.

Alexander Obuhovich

unread,
Nov 18, 2009, 1:47:21 PM11/18/09
to in-port...@googlegroups.com
Yes, we will loose that of course, but total string width should be calculated based on markup + text length as for now.

--

You received this message because you are subscribed to the Google Groups "In-Portal Bugs" group.
To post to this group, send email to in-port...@googlegroups.com.
To unsubscribe from this group, send email to in-portal-bug...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/in-portal-bugs?hl=en.


Dmitry A.

unread,
Nov 18, 2009, 1:49:20 PM11/18/09
to In-Portal Bugs
Let's do a quick research on this to see if there are any better
approaches for this.

Any one else has ideas on this issue? Perhaps Sergay or Gleb?


DA.

On Nov 18, 12:47 pm, Alexander Obuhovich <aik.b...@gmail.com> wrote:
> Yes, we will loose that of course, but total string width should be
> calculated based on markup + text length as for now.
>
>
>
>
>
> On Wed, Nov 18, 2009 at 8:41 PM, Dmitry A. <dandre...@gmail.com> wrote:
> > I think the problem is that we'll be loosing the actual formating on
> > that field if we do "stript_tags", correct?
>
> > DA.
>
> > On Nov 17, 12:21 pm, Alexander Obuhovich <aik.b...@gmail.com> wrote:
> > > Currently  "first_chars" / "cut_first" parameters are used to show only
> > > first N characters of string. In case if string contains HTML, then it
> > could
> > > result in broken html. We should use strip_tags function, before applying
> > > any string cutting.
>
> > > --
> > > Best Regards,
>
> > >http://www.in-portal.orghttp://www.alex-time.com
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "In-Portal Bugs" group.
> > To post to this group, send email to in-port...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > in-portal-bug...@googlegroups.com<in-portal-bugs%2Bunsubscribe@go­oglegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/in-portal-bugs?hl=en.
>
> --
> Best Regards,
>
> http://www.in-portal.orghttp://www.alex-time.com- Hide quoted text -
>
> - Show quoted text -

Dmitry A.

unread,
Dec 16, 2009, 1:17:58 PM12/16/09
to In-Portal Bugs
Hey Sergey,


Do you have any ideas how we can improve this?

Thanks.


DA.
> >http://www.in-portal.orghttp://www.alex-time.com-Hide quoted text -

Alexander Obuhovich

unread,
Dec 16, 2009, 1:29:52 PM12/16/09
to in-port...@googlegroups.com
I think to stick with my initial post for now, because cut_first
parameter was initially designed to show only first N chapters of text
in the field. At that times it was only used for plain text fields.
Today it is used for fields, that could contain html and raises 2
mentioned above (strip tags for total width calculation, html tags cut
in the middle becomes broken) problems.
> in-portal-bug...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/in-portal-bugs?hl=en.
>
>
>

--
Sent from my mobile device

Alexander Obuhovich

unread,
Dec 23, 2009, 3:59:55 AM12/23/09
to in-port...@googlegroups.com
Here is appropriate task: http://tracker.in-portal.org/view.php?id=480 (0000480: Fixes to "first_chars" / "cut_first" parameters).
--
Reply all
Reply to author
Forward
0 new messages