Announcement

  •  » Requests
  •  » [BUG] pwg.categories.add strip html markup

#1 2013-02-28 04:17:55

norbusan
Member
Komatsu, Ishikawa, Japan
2011-06-11
61

[BUG] pwg.categories.add strip html markup

Dear all,

we are using the pwg.categories.add call to create new categories from Shotwell, but I think it seems that piwigo strip html markup from the comment during creation, although something similar does not happen when one uploads photos with comments containing html markup.

I consider this a bug, or is there a way around it?

Thanks a lot

Norbert

Offline

 

#2 2013-02-28 11:15:39

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: [BUG] pwg.categories.add strip html markup

Hi norbusan,

In [Subversion] r15850 mistic100 has added:

Code:

    if ( !empty($params['comment']) ) 
    { 
      $updates['comment'] = strip_tags($params['comment']); 
    }

while in admin/cat_modify.php I had coded (8 years ago in [Subversion] r825):

Code:

'comment' =>
        $conf['allow_html_descriptions'] ?
          @$_POST['comment'] : strip_tags(@$_POST['comment']),

And $conf['allow_html_descriptions'] is true by default.

I notify mistic100 him to know why he forces the strip_tags function.

Offline

 

#3 2013-02-28 12:39:07

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: [BUG] pwg.categories.add strip html markup

no particular reason, this can be changed

Offline

 

#4 2013-02-28 13:30:50

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: [BUG] pwg.categories.add strip html markup

mistic100 wrote:

no particular reason, this can be changed

OK, I do for Piwigo 2.5

Offline

 

#5 2013-02-28 13:35:36

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: [BUG] pwg.categories.add strip html markup

Offline

 

#6 2013-02-28 13:41:39

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: [BUG] pwg.categories.add strip html markup

Offline

 

#7 2013-02-28 14:25:37

norbusan
Member
Komatsu, Ishikawa, Japan
2011-06-11
61

Re: [BUG] pwg.categories.add strip html markup

Hi Pierrick, hi Damien,

thanks for the messages and the fix, that is very much appreciated!

Norbert

(and Pierrick, thanks for your comment on my blog, next release of shotwell will be rather soon, so it will contain all of the improvements I submitted)

Offline

 

#8 2013-02-28 14:40:20

norbusan
Member
Komatsu, Ishikawa, Japan
2011-06-11
61

Re: [BUG] pwg.categories.add strip html markup

BTW, I confirm that the svn changeset applied to the latest release fixes the problem. I just made the same change in my installation, and created a new album with shotwell where a comment contains markup. Worked all nicely.

Thanks!

Norbert

Offline

 
  •  » Requests
  •  » [BUG] pwg.categories.add strip html markup

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact