text box strip away href and name attribute

Bug #725634 reported by Shinichi Okada
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Low
François Marier

Bug Description

I think this could be a bug.
When I add links and save it in a text box, it strips away href and name attributes.
It should be able to create a link in text box, isn't it?

Revision history for this message
François Marier (fmarier) wrote :

This is related to this forum discussion:

  http://mahara.org/interaction/forum/topic.php?id=2879#post12445

Changed in mahara:
milestone: none → 1.4.0
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Shinichi Okada (okada-shin) wrote :

It will be nice to have an admin area where admin can decide what can be allowed with radio boxs.

Revision history for this message
François Marier (fmarier) wrote :

Hi Shin,

I have added this to lib/web.php:clean_html():

  $config->set('Attr.EnableID', true);
  $config->set('Attr.IDPrefix', 'user_');

as suggested on:

  http://htmlpurifier.org/docs/enduser-id.html

Does that solve your problem? (I have attached the patch I committed to master.)

Cheers,
Francois

Changed in mahara:
status: Triaged → Fix Committed
assignee: nobody → François Marier (fmarier)
Revision history for this message
Shinichi Okada (okada-shin) wrote :

I did not use $config->set('Attr.IDPrefix', 'user_'); but as you know I wrote my solution at

http://mahara.org/interaction/forum/topic.php?id=2879#post12492.

I will check it again with $config->set('Attr.IDPrefix', 'user_');.

Revision history for this message
François Marier (fmarier) wrote :

The ID prefix is there to help prevent conflicts with exists IDs in Mahara. However it does mean that you have to put "example.php#user_myid" instead of "example.php#myid" in your links.

Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.