[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5280] * tp/Texinfo/Convert/DocBook.pm(_protect_text): remove
From: |
Patrice Dumas |
Subject: |
[5280] * tp/Texinfo/Convert/DocBook.pm(_protect_text): remove |
Date: |
Tue, 06 Aug 2013 21:57:07 +0000 |
Revision: 5280
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5280
Author: pertusus
Date: 2013-08-06 21:57:06 +0000 (Tue, 06 Aug 2013)
Log Message:
-----------
* tp/Texinfo/Convert/DocBook.pm(_protect_text): remove
form-feed from output, as it is not allowed in XML.
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/Convert/DocBook.pm
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2013-08-06 21:55:41 UTC (rev 5279)
+++ trunk/ChangeLog 2013-08-06 21:57:06 UTC (rev 5280)
@@ -2,6 +2,8 @@
* tp/Texinfo/Convert/TexinfoXML.pm(_xml_attributes):
do not protect \f and \ in spaces or trailingspaces attributes.
+ * tp/Texinfo/Convert/DocBook.pm(_protect_text): remove
+ form-feed from output, as it is not allowed in XML.
2013-08-06 Patrice Dumas <address@hidden>
Modified: trunk/tp/Texinfo/Convert/DocBook.pm
===================================================================
--- trunk/tp/Texinfo/Convert/DocBook.pm 2013-08-06 21:55:41 UTC (rev 5279)
+++ trunk/tp/Texinfo/Convert/DocBook.pm 2013-08-06 21:57:06 UTC (rev 5280)
@@ -447,6 +447,15 @@
return ($element, $attributes);
}
+sub _protect_text($$)
+{
+ my $self = shift;
+ my $text = shift;
+ my $result = $self->xml_protect_text($text);
+ # form feed not allowed in XML
+ $result =~ s/\f//g;
+ return $result;
+}
sub _convert($$;$);
@@ -473,7 +482,7 @@
} elsif ($self->{'document_context'}->[-1]->{'raw'}) {
return $root->{'text'};
}
- $result = $self->xml_protect_text($root->{'text'});
+ $result = $self->_protect_text($root->{'text'});
if (! defined($root->{'type'}) or $root->{'type'} ne 'raw') {
if (!$self->{'document_context'}->[-1]->{'monospace'}->[-1]) {
$result =~ s/``/$ldquo/g;
@@ -906,7 +915,7 @@
= $self->Texinfo::Convert::Plaintext::_image_text($root,
$basefile);
if (defined($image_text)) {
$result .= "<textobject><literallayout>"
- .$self->xml_protect_text($image_text)
+ .$self->_protect_text($image_text)
.'</literallayout></textobject>';
}
if (!defined($image_text) and !$image_file_found) {
@@ -933,7 +942,7 @@
if (defined($root->{'extra'}->{'brace_command_contents'}->[0])) {
$email = $root->{'extra'}->{'brace_command_contents'}->[0];
$email_text
- = $self->xml_protect_text(Texinfo::Convert::Text::convert(
+ = $self->_protect_text(Texinfo::Convert::Text::convert(
{'contents' => $email},
{'code' => 1,
Texinfo::Common::_convert_text_options($self)}));
@@ -954,7 +963,7 @@
my ($url_text, $url_content);
if (defined($root->{'extra'}->{'brace_command_contents'}->[0])) {
$url_content = $root->{'extra'}->{'brace_command_contents'}->[0];
- $url_text =
$self->xml_protect_text(Texinfo::Convert::Text::convert(
+ $url_text = $self->_protect_text(Texinfo::Convert::Text::convert(
{'contents' => $url_content},
{'code' => 1,
Texinfo::Common::_convert_text_options($self)}));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5280] * tp/Texinfo/Convert/DocBook.pm(_protect_text): remove,
Patrice Dumas <=