[librdf-rdfa-generator-perl] 12/64: release generator 0.03 and linter 0.01.
Jonas Smedegaard
dr at jones.dk
Sat Dec 23 12:22:50 UTC 2017
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag debian/0.106-1
in repository librdf-rdfa-generator-perl.
commit 05a9922ef0b3cae3bd11a6a0a1963e0bcf8ef7a8
Author: Toby Inkster <mail at tobyinkster.co.uk>
Date: Wed May 19 20:15:56 2010 +0000
release generator 0.03 and linter 0.01.
--HG--
branch : RDF-RDFa-Generator
extra : convert_revision : svn%3A3fe8e991-6959-4966-b76d-b07eca2b6e37/RDF-RDFa-Generator%40361
---
Changes.ttl | 14 +++++++++++++-
Changes.xml | 20 ++++++++++++++++++++
META.yml | 2 +-
RDF-RDFa-Generator-0.03.tar.gz | Bin 0 -> 36179 bytes
README | 5 ++++-
lib/RDF/RDFa/Generator.pm | 6 ++++--
lib/RDF/RDFa/Generator/HTML/Head.pm | 2 ++
lib/RDF/RDFa/Generator/HTML/Hidden.pm | 2 ++
lib/RDF/RDFa/Generator/HTML/Pretty.pm | 13 +++++++++++++
lib/RDF/RDFa/Generator/HTML/Pretty/Note.pm | 2 ++
10 files changed, 61 insertions(+), 5 deletions(-)
diff --git a/Changes.ttl b/Changes.ttl
index c57f35b..94bd05b 100644
--- a/Changes.ttl
+++ b/Changes.ttl
@@ -40,6 +40,18 @@ my:v_0-02
dcs:item [ rdfs:label "HTML::Pretty can now include additional textual notes in the output. This functionality added for RDF::RDFa::Linter."@en ; a dcs:Addition ]
] .
+my:v_0-03
+
+ a :Version ;
+ dc:issued "2010-05-19"^^xsd:date ;
+ :revision "0.03"^^xsd:string ;
+ :file-release <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/RDF-RDFa-Generator-0.03.tar.gz> ;
+ dcs:changeset [
+ dcs:versus my:v_0-02 ;
+ dcs:item [ rdfs:label "HTML::Pretty Fallback to sorting by object now works."@en ; a dcs:Bugfix ] ;
+ dcs:item [ rdfs:label "HTML::Pretty can now force safe HTML (prevents injection attacks)."@en ; a dcs:Addition ]
+ ] .
+
#############################################################
my:project
@@ -58,7 +70,7 @@ my:project
:tester toby:i ;
:created "2010-05-05"^^xsd:date ;
:license <http://dev.perl.org/licenses/> ;
- :release my:v_0-01 , my:v_0-02 .
+ :release my:v_0-01 , my:v_0-02 , my:v_0-03 .
#############################################################
diff --git a/Changes.xml b/Changes.xml
index 5773277..1ac63a3 100644
--- a/Changes.xml
+++ b/Changes.xml
@@ -41,6 +41,26 @@
<file-release rdf:resource="http://backpan.cpan.org/authors/id/T/TO/TOBYINK/RDF-RDFa-Generator-0.02.tar.gz"/>
<revision rdf:datatype="http://www.w3.org/2001/XMLSchema#string">0.02</revision>
</Version>
+ <Version rdf:about="http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-03">
+ <dcs:changeset>
+ <rdf:Description>
+ <dcs:item>
+ <dcs:Bugfix>
+ <rdfs:label xml:lang="en">HTML::Pretty Fallback to sorting by object now works.</rdfs:label>
+ </dcs:Bugfix>
+ </dcs:item>
+ <dcs:item>
+ <dcs:Addition>
+ <rdfs:label xml:lang="en">HTML::Pretty can now force safe HTML (prevents injection attacks).</rdfs:label>
+ </dcs:Addition>
+ </dcs:item>
+ <dcs:versus rdf:resource="http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-02"/>
+ </rdf:Description>
+ </dcs:changeset>
+ <dc:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2010-05-19</dc:issued>
+ <file-release rdf:resource="http://backpan.cpan.org/authors/id/T/TO/TOBYINK/RDF-RDFa-Generator-0.03.tar.gz"/>
+ <revision rdf:datatype="http://www.w3.org/2001/XMLSchema#string">0.03</revision>
+ </Version>
<Project rdf:about="http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/project">
<bug-database rdf:resource="http://rt.cpan.org/Dist/Display.html?Queue=RDF-RDFa-Generator"/>
<created rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2010-05-05</created>
diff --git a/META.yml b/META.yml
index 65b6c39..b9bb047 100644
--- a/META.yml
+++ b/META.yml
@@ -29,4 +29,4 @@ resources:
homepage: http://search.cpan.org/dist/RDF-RDFa-Generator/
license: http://dev.perl.org/licenses/
repository: http://goddamn.co.uk/viewvc/perlmods/RDF-RDFa-Generator/
-version: 0.02
+version: 0.03
diff --git a/RDF-RDFa-Generator-0.03.tar.gz b/RDF-RDFa-Generator-0.03.tar.gz
new file mode 100644
index 0000000..c138d83
Binary files /dev/null and b/RDF-RDFa-Generator-0.03.tar.gz differ
diff --git a/README b/README
index 76bbc39..b8615ef 100644
--- a/README
+++ b/README
@@ -2,7 +2,7 @@ NAME
RDF::RDFa::Generator - generate some data in RDFa
VERSION
- 0.02
+ 0.03
DESCRIPTION
Constructor
@@ -29,6 +29,9 @@ DESCRIPTION
* prefix_attr - use the @prefix attribute for CURIE prefixes (RDFa
1.1 only). Boolean, defaults to false.
+ * safe_xml_literals - prevents XML literals from injecting
+ arbitrary XHTML into the output. Boolean, defaults to FALSE.
+
* title - assign a <title> element for generated XHTML documents.
* version - set generated RDFa version. Valid values are '1.0'
diff --git a/lib/RDF/RDFa/Generator.pm b/lib/RDF/RDFa/Generator.pm
index 9ba3d97..60316ac 100644
--- a/lib/RDF/RDFa/Generator.pm
+++ b/lib/RDF/RDFa/Generator.pm
@@ -4,7 +4,7 @@ RDF::RDFa::Generator - generate some data in RDFa
=head1 VERSION
-0.02
+0.03
=cut
@@ -13,7 +13,7 @@ package RDF::RDFa::Generator;
use 5.008;
use common::sense;
-our $VERSION = '0.02';
+our $VERSION = '0.03';
use RDF::RDFa::Generator::HTML::Head;
use RDF::RDFa::Generator::HTML::Hidden;
@@ -55,6 +55,8 @@ Options include:
=item * B<prefix_attr> - use the @prefix attribute for CURIE prefixes (RDFa 1.1 only). Boolean, defaults to false.
+=item * B<safe_xml_literals> - prevents XML literals from injecting arbitrary XHTML into the output. Boolean, B<defaults to FALSE>.
+
=item * B<title> - assign a <title> element for generated XHTML documents.
=item * B<version> - set generated RDFa version. Valid values are '1.0' (the default) or '1.1'.
diff --git a/lib/RDF/RDFa/Generator/HTML/Head.pm b/lib/RDF/RDFa/Generator/HTML/Head.pm
index 786f885..9e5951e 100644
--- a/lib/RDF/RDFa/Generator/HTML/Head.pm
+++ b/lib/RDF/RDFa/Generator/HTML/Head.pm
@@ -5,6 +5,8 @@ use base qw'RDF::RDFa::Generator';
use common::sense;
use XML::LibXML qw':all';
+our $VERSION = '0.03';
+
sub new
{
my ($class, %opts) = @_;
diff --git a/lib/RDF/RDFa/Generator/HTML/Hidden.pm b/lib/RDF/RDFa/Generator/HTML/Hidden.pm
index ced9790..d9e2982 100644
--- a/lib/RDF/RDFa/Generator/HTML/Hidden.pm
+++ b/lib/RDF/RDFa/Generator/HTML/Hidden.pm
@@ -5,6 +5,8 @@ use base qw'RDF::RDFa::Generator::HTML::Head';
use common::sense;
use XML::LibXML qw':all';
+our $VERSION = '0.03';
+
sub injection_site
{
return '//xhtml:body';
diff --git a/lib/RDF/RDFa/Generator/HTML/Pretty.pm b/lib/RDF/RDFa/Generator/HTML/Pretty.pm
index 43fa39c..7bd3ab1 100644
--- a/lib/RDF/RDFa/Generator/HTML/Pretty.pm
+++ b/lib/RDF/RDFa/Generator/HTML/Pretty.pm
@@ -8,6 +8,8 @@ use Icon::FamFamFam::Silk;
use RDF::RDFa::Generator::HTML::Pretty::Note;
use XML::LibXML qw':all';
+our $VERSION = '0.03';
+
sub create_document
{
my ($proto, $model, %opts) = @_;
@@ -190,6 +192,17 @@ sub _resource_statements
$DD->setAttribute('xml:lang', $st->object->literal_value_language);
$DD->appendTextNode($st->object->literal_value);
}
+ elsif ($self->{'safe_xml_literals'}
+ && $st->object->is_literal
+ && $st->object->has_datatype
+ && $st->object->literal_datatype eq 'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral')
+ {
+ $DD->setAttribute('property', $self->_make_curie($st->predicate->uri, $prefixes));
+ $DD->setAttribute('class', 'typed-literal datatype-xmlliteral');
+ $DD->setAttribute('datatype', $self->_make_curie($st->object->literal_datatype, $prefixes));
+ $DD->setAttribute('content', $st->object->literal_value);
+ $DD->addNewChild(XHTML_NS, 'pre')->addNewChild(XHTML_NS, 'code')->appendTextNode($st->object->literal_value);
+ }
elsif ($st->object->is_literal
&& $st->object->has_datatype
&& $st->object->literal_datatype eq 'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral')
diff --git a/lib/RDF/RDFa/Generator/HTML/Pretty/Note.pm b/lib/RDF/RDFa/Generator/HTML/Pretty/Note.pm
index 0b2f7de..7242f07 100644
--- a/lib/RDF/RDFa/Generator/HTML/Pretty/Note.pm
+++ b/lib/RDF/RDFa/Generator/HTML/Pretty/Note.pm
@@ -11,6 +11,8 @@ use common::sense;
use constant XHTML_NS => 'http://www.w3.org/1999/xhtml';
use XML::LibXML qw':all';
+our $VERSION = '0.03';
+
=head1 DESCRIPTION
Often you'll want to create your own subclass of this as the basic notes are pretty
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/librdf-rdfa-generator-perl.git
More information about the Pkg-perl-cvs-commits
mailing list