summaryrefslogtreecommitdiffstats
path: root/importxml.pl
diff options
context:
space:
mode:
authorjake%acutex.net <>2001-11-26 23:16:10 +0100
committerjake%acutex.net <>2001-11-26 23:16:10 +0100
commita0f65b004b93045d321d371687d826479c2b5404 (patch)
tree592289388054532b9226ba6f0e22905c82bb4f54 /importxml.pl
parent33d983e6f62280cd8714a954a842239ef7cd6eb9 (diff)
downloadbugzilla-a0f65b004b93045d321d371687d826479c2b5404.tar.gz
bugzilla-a0f65b004b93045d321d371687d826479c2b5404.tar.xz
Bug 109530 - xml.cgi was quoting stuff way too much. This is because it was incorrectly quoted in Bug.pm
r= justdave, louie
Diffstat (limited to 'importxml.pl')
-rwxr-xr-ximportxml.pl13
1 files changed, 8 insertions, 5 deletions
diff --git a/importxml.pl b/importxml.pl
index 4dfd421be..e3532c53a 100755
--- a/importxml.pl
+++ b/importxml.pl
@@ -88,12 +88,15 @@ sub sillyness {
$zz = %::target_milestone;
}
+# XML::Parser automatically unquotes characters when it
+# parses the XML, so this routine shouldn't be needed
+# for anything (see bug 109530).
sub UnQuoteXMLChars {
$_[0] =~ s/&amp;/&/g;
$_[0] =~ s/&lt;/</g;
$_[0] =~ s/&gt;/>/g;
- $_[0] =~ s/&apos;/'/g;
- $_[0] =~ s/&quot;/"/g;
+ $_[0] =~ s/&apos;/'/g; # ' # Darned emacs colors
+ $_[0] =~ s/&quot;/"/g; # " # Darned emacs colors
# $_[0] =~ s/([\x80-\xFF])/&XmlUtf8Encode(ord($1))/ge;
return($_[0]);
}
@@ -318,7 +321,7 @@ for (my $k=1 ; $k <= $bugqty ; $k++) {
$long_description .= "$sorted_descs[$z]->{'bug_when'}";
$long_description .= " ----\n\n";
}
- $long_description .= UnQuoteXMLChars($sorted_descs[$z]->{'thetext'});
+ $long_description .= $sorted_descs[$z]->{'thetext'};
$long_description .= "\n";
}
@@ -351,12 +354,12 @@ for (my $k=1 ; $k <= $bugqty ; $k++) {
if ( (defined $bug_fields{'bug_file_loc'}) && ($bug_fields{'bug_file_loc'}) ){
push (@query, "bug_file_loc");
- push (@values, SqlQuote(UnQuoteXMLChars($bug_fields{'bug_file_loc'})));
+ push (@values, SqlQuote($bug_fields{'bug_file_loc'}));
}
if ( (defined $bug_fields{'short_desc'}) && ($bug_fields{'short_desc'}) ){
push (@query, "short_desc");
- push (@values, SqlQuote(UnQuoteXMLChars($bug_fields{'short_desc'})) );
+ push (@values, SqlQuote($bug_fields{'short_desc'}) );
}