← Back to team overview

mahara-contributors team mailing list archive

[Bug 799035] Re: Decrease the line height in page and group descriptions on the overview pages

 

The paragraph text for the group/find.php page looks to be consistent
with other similar pages now in v1.8 - it isn't showing true <p></p>
paragraphs but rather has <br><br><br> between each paragraph.

The view/index.php page however is still not displaying paragraph breaks
in the description.

I note in the templates that for the groups list:
<div class="detail">{$group->description|str_shorten_html:100:true|safe}</div>

lacks the strip_tags option that the the portfolio list has:
<div class="detail">{$view.description|str_shorten_html:110:true|strip_tags|safe}</div>

As both descriptions are saved via the tinymce one would think either
both were safe or both were not. So consistency is needed.

The php function strip_tags ( string $str [, string $allowable_tags ] )
has an allowable tag option - which on the surface looks to be what wee
need to keep things like <br> or <p> tags - but it doesn't clean up the
attributes of the tag so one could have <p
onmouseover="javascript:do_bad_things"> which is not good.

I am of the belief that we need a strip_tags_safe() function that leaves
certain safe tags like <p></p> or <br> behind when cleaning out other
tags but also making sure the <br> or <p> are absent of any attributes.

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/799035

Title:
  Decrease the line height in page and group descriptions on the
  overview pages

Status in Mahara ePortfolio:
  Triaged

Bug description:
  on master

  I had already reported this problem earlier, I think for the resumé,
  but can't find the bug report to continue. On
  http://URL/group/find.php  the spacing between paragraphs in a
  description is too large.

  In contrast, on http://URL/view/ paragraph breaks are ignored
  altogether.

  I think it would be good to have a consistent behavior. I would prefer
  regular paragraph breaks with a smaller line height.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/799035/+subscriptions


References