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
Good idea. I just noticed that Springer puts the DOI in x-doi. I can use that. Christian Zimmermann FIGUGEGL! Economic Research Federal Reserve Bank of St. Louis P.O. Box 442 St. Louis MO 63166-0442 USA https://ideas.repec.org/zimm/ @CZimm_economist On Wed, 6 Jul 2016, Thomas Krichel wrote:
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@lists.openlib.org http://lists.openlib.org/cgi-bin/mailman/listinfo/redif-dev
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@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@lists.openlib.org http://lists.openlib.org/cgi-bin/mailman/listinfo/redif-dev
Sune Karlsson writes
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.
I think if we can combine the sharp analyics of Sune with my dull vision, we can do better than a fudge. First, maybe we can check if the x- attribute is in a cluster, and if that is the case, don't skip the strip. Second, if we authorize name-last and name-first, as well as Doi, which I think we should as well, we can then preprocess a template from former x- to now allowable structures. -- Cheers, Thomas Krichel http://openlib.org/home/krichel skype:thomaskrichel
participants (3)
-
'Christian Zimmermann' -
Sune Karlsson -
Thomas Krichel