Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-14024 Invalid html generated by changes2html.pl (#38)

András Salamonf966d98e1c1e
diff --git a/gradle/documentation/changes-to-html/changes2html.pl b/gradle/documentation/changes-to-html/changes2html.pl
old mode 100644
new mode 100755
index 1ebf33eefd7..0d55437721c
--- a/gradle/documentation/changes-to-html/changes2html.pl
+++ b/gradle/documentation/changes-to-html/changes2html.pl
@@ -254,7 +254,8 @@ print<<"__HTML_HEADER__";
* limitations under the License.
****************************************************************************
-->
-<html>
+<!DOCTYPE html>
+<html lang="en">
<head>
<title>$title</title>
<link rel="stylesheet" href="ChangesFancyStyle.css" title="Fancy">
@@ -289,7 +290,9 @@ print<<"__HTML_HEADER__";
}
var orderedLists = document.getElementsByTagName("ol");
for (var i = 0; i < orderedLists.length; i++)
- orderedLists[i].style.display = "none";
+ orderedLists[i].style.display = "none";
+ var olderList = document.getElementById("older.list");
+ olderList.style.display = "none";
var anchors = document.getElementsByTagName("a");
for (var i = 0 ; i < anchors.length; i++) {
if (anchors[i].id != '')
@@ -308,6 +311,8 @@ print<<"__HTML_HEADER__";
var orderedLists = document.getElementsByTagName("ol");
for (var i = 0; i < orderedLists.length; i++)
orderedLists[i].style.display = "block";
+ var olderList = document.getElementById("older.list");
+ olderList.style.display = "block";
var anchors = document.getElementsByTagName("a");
for (var i = 0 ; i < anchors.length; i++) {
if (anchors[i].id != '')
@@ -368,6 +373,8 @@ print<<"__HTML_HEADER__";
list.style.display = "none";
}
}
+ var olderList = document.getElementById("older.list");
+ olderList.style.display = "none";
/* Add "Click to collapse/expand" tooltips to the release/section headings */
var anchors = document.getElementsByTagName("a");
for (var i = 0 ; i < anchors.length; i++) {
@@ -418,7 +425,7 @@ for my $rel (@releases) {
print "<h2><a id=\"older\" href=\"javascript:toggleList('older')\">";
print "Older Releases";
print "</a></h2>\n";
- print "<ul id=\"older.list\">\n"
+ print "<div id=\"older.list\">\n"
}
($release, $reldate, $relinfo, $sections) = @$rel;
@@ -442,6 +449,7 @@ for my $rel (@releases) {
if ($has_release_sections);
}
+ my $licnt = 0;
for my $section (@$sections) {
($heading, $items) = @$section;
(my $sectid = lc($heading)) =~ s/\s+/_/g;
@@ -451,12 +459,13 @@ for my $rel (@releases) {
if ($release) {
if ($heading) {
if ($heading eq 'Detailed Change List') {
- print " <$subheader>$heading</$subheader>\n";
+ print " <li style='list-style-type:none;'><$subheader>$heading</$subheader></li>\n";
next;
} elsif ($has_release_sections) {
print " <li><a id=\"$relid.$sectid\"",
" href=\"javascript:toggleList('$relid.$sectid')\">$heading</a>",
- "&nbsp;&nbsp;&nbsp;$numItemsStr\n"
+ "&nbsp;&nbsp;&nbsp;$numItemsStr\n";
+ ++$licnt;
}
}
} else { # $release is not defined
@@ -480,7 +489,7 @@ for my $rel (@releases) {
my $prefix = $1;
my $code = $2;
$code =~ s/\s+$//;
- "$prefix<code><pre>$code</pre></code>"
+ "$prefix<pre><code>$code></code></pre>"
}gise;
$item = markup_trailing_attribution($item) unless ($item =~ /\n[ ]*-/);
@@ -551,7 +560,9 @@ for my $rel (@releases) {
}
}sge;
- $item =~ s:\n{2,}:\n<p/>\n:g; # Keep paragraph breaks
+ $item =~ s:\n{2,}:\n<p>\n:g; # Keep paragraph breaks
+ $item =~ s:</li>\n<p>\n<li:</li>\n<li\n:g;
+ $item =~ s:</li>\n<p>\n(.*)\n:</li></ul><p>\n$1\n<ul>:g;
# Link LUCENE-XXX, SOLR-XXX and INFRA-XXX to JIRA
$item =~ s{(?:${jira_url_prefix})?((?:LUCENE|SOLR|INFRA)-\d+)}
{<a href="${jira_url_prefix}$1">$1</a>}g;
@@ -600,18 +611,22 @@ for my $rel (@releases) {
}
# Linkify URLs, except Bugzilla links, which don't work anymore
- $item =~ s~(?<![">])(https?://(?!(?:nagoya|issues)\.apache\.org/bugzilla)[^\s\)]+)~<a href="$1">$1</a>~g;
+ # also ignore localhost, ..., $SOLR_PORT, 127.0.0.1
+ $item =~ s~(?<![">])(https?://(?!(?:nagoya|issues)\.apache\.org/bugzilla|localhost|\.\.\.|\$SOLR_HOST|127\.0\.0\.1)[^\s\)]+)~<a href="$1">$1</a>~g;
- $item =~ s~</ul>\s+<p/>\s+<br\s*/>~</ul>~;
+ $item =~ s~</ul>\s+<p>\s+<br\s*/>~</ul>~;
print " <$list_item>$item</$list_item>\n";
}
print " </$list>\n" unless (not $release or ($has_release_sections and not $heading));
- print " </li>\n" if ($release and $has_release_sections);
+ if ($release and $has_release_sections and $licnt>0) {
+ print " </li>\n";
+ --$licnt;
+ }
}
print "</ul>\n" if ($release and $has_release_sections);
}
-print "</ul>\n" if ($relcnt > 3);
+print "</div>\n" if ($relcnt > 3);
print "</body>\n</html>\n";
@@ -708,7 +723,6 @@ sub markup_trailing_attribution {
sub has_release_sections {
my $sections = shift;
my $has_release_sections = 0;
- my $first_titled_section_num = -1;
for my $section_num (0 .. $#{$sections}) {
if ($sections->[$section_num][0]) {
$has_release_sections = 1;
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index cc51469b01d..0cc414e22d3 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -10031,7 +10031,6 @@ Upgrading from Solr 5.1
SOLR_SSL_TRUST_STORE_PASSWORD, SOLR_SSL_NEED_CLIENT_AUTH and SOLR_SSL_WANT_CLIENT_AUTH
have been introduced. The bin/solr scripts configure the SOLR_SSL_OPTS property
automatically based on the above new properties.
-
You should *not* configure the SOLR_SSL_OPTS property directly inside solr.in.{sh,cmd}.
- Support for SOLR_SSL_PORT property has been removed. Instead use the regular SOLR_PORT