[ReDev] X- attribute treatment

Sune Karlsson Sune.Karlsson at oru.se
Wed Jul 6 15:02:03 UTC 2016


It doesn't only disable stripping html it also disables decoding of html entities. This would cause problems with Author-x-name-last and Author-x-name-first. Unofficial but fairly widely used.

ReDIF-perl has stripped and decoded all values ever since these capabilities was added. Changing things that services might rely on is not a good idea.

It's unfortunate that Jose Manuel has been caught out by this but there was a quite lengthy discussion of this on RePEc-Run when stripping was added in 2012.

It is a fudge but I think the best is to special-case x-bibl.

/Sune

> -----Original Message-----
> From: ReDIF-dev [mailto:redif-dev-bounces at lists.openlib.org] On Behalf
> Of Thomas Krichel
> Sent: Wednesday, July 06, 2016 1:37 PM
> To: ReDIF-Dev
> Subject: [ReDev] X- attribute treatment
> 
> 
>   Sune Karlsson, on CitEc-run, wrote
> 
> > That was not a terribly good fix. Turns out that $attribute can be
> undefined so
> >
> > $value = decode_and_strip_html( $value ) unless defined $attribute and
> $attribute eq 'x-bibl';
> >
> > is better unless you want a lot of warnings about $attribute being
> undefined.
> 
>   What abouot disabling stripping for all x-attributes
> 
>   $value = decode_and_strip_html($value)
>      unless defined $attribute and lc(substr($attribute,0,2)) eq 'x-');
> 
> --
> 
>   Cheers,
> 
>   Thomas Krichel                  http://openlib.org/home/krichel
>                                               skype:thomaskrichel
> 
> _______________________________________________
> ReDIF-dev mailing list
> ReDIF-dev at lists.openlib.org
> http://lists.openlib.org/cgi-bin/mailman/listinfo/redif-dev



More information about the ReDIF-dev mailing list