[
https://issues.apache.org/jira/browse/SOLR-10337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15935585#comment-15935585
]
NW Brad commented on SOLR-10337:
--------------------------------
I'm using this via a curl command:
curl http://localhost:8983/solr/test_core/update/extract?literal.id=33 -F
"myfile=@test_data/a_simple_html_page_jira.htm"
This is a small portion of the html page. It comes from a 3rd party web page
I'm trying to index, so I have no control over its content, syntax, etc.
==============================================================================
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>Example of a simple HTML page</title>
<meta name="generator" content="Adobe RoboHelp - www.adobe.com">
<link rel="stylesheet"
href="./example_of_a_simple_html_page_files/default_ns.css"><script
type="text/javascript" language="JavaScript" title="WebHelpSplitCss">
<!--
if (navigator.appName !="Netscape")
{ document.write("<link rel='stylesheet' href='default.css'>");}
//-->
</script>
<script type="text/javascript" language="JavaScript"
title="WebHelpInlineScript">
<!--
function reDo() {
if (innerWidth != origWidth || innerHeight != origHeight)
location.reload();
}
if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape"))
{
origWidth = innerWidth;
origHeight = innerHeight;
onresize = reDo;
}
onerror = null;
//-->
</script>
<script>
function myFunctionInsideHead() {
document.getElementById("demo-head").innerHTML = "Paragraph changed.";
}
</script>
</head>
<body>
<script type="text/javascript" language="JavaScript">
function myFunctionInsideBody() {
document.getElementById("demo-body-04").innerHTML = "Paragraph changed.";
}
</script>
<table width="100%"><tbody><tr><td width="33%"><div align="left"><table
cellpadding="2" cellspacing="0" border="0"><tbody><tr><td><a title="Show
Navigation Component" class="whtbtnshow" href="javascript:void(0);"
onclick="show();return
false;">Show</a> </td></tr></tbody></table></div></td></tr></tbody></table>
<h1>Example of a simple HTML page</h1>
<p>Hypertext Markup Language (HTML) is the most common language used to
create documents on the World Wide Web. HTML uses hundreds of different
tags to define a layout for web pages. Most tags require an opening
<tag>
and a closing </tag>.</p>
<p><span style="font-weight: bold;"><b>Example:</b></span> <b>On
a webpage, this sentence would be in bold print.</b> </p>
<p>Below is an example of a very simple page: </p>
<script type="text/javascript" language="javascript1.2">
<!--
if (window.writeIntopicBar)
writeIntopicBar(0);
//-->
</script>
</body></html>
==============================================================================
basic condensed results as viewed from luke
==============================================================================
Example of a simple HTML page
function myFunctionInsideBody() {
document.getElementById("demo-body-04").innerHTML = "Paragraph changed.";
}
Show
Example of a simple HTML page
Hypertext Markup Language (HTML) is the most common language used to
create documents on the World Wide Web. HTML uses hundreds of different
tags to define a layout for web pages. Most tags require an opening <tag>
and a closing </tag>.
Example: <b>On
a webpage, this sentence would be in bold print.</b>
Below is an example of a very simple page:
<!--
if (window.writeIntopicBar)
writeIntopicBar(0);
//-->
> HTMLStripCharFilterFactory does not seem to handle <script> section inside a
> <body> section
> -------------------------------------------------------------------------------------------
>
> Key: SOLR-10337
> URL: https://issues.apache.org/jira/browse/SOLR-10337
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: contrib - Solr Cell (Tika extraction)
> Affects Versions: 6.4.1
> Environment: WIndows 7 professional 64bit (current patch/release)
> Reporter: NW Brad
>
> HTMLStripCharFilterFactory does not remove <script> sections from the <body>
> section of HTML document, but works fine in the <head> section.
> Fails remove <script> section content (removes tags, leaves content):
> <body>
> <script>
> function myFunctionInsideBody() {
> document.getElementById("demo_body").innerHTML = "Paragraph changed.";
> }
> </script>
> ...
> </body>
> Works - removes entire <script> section:
> <head>
> <script>
> function myFunctionInsideHead() {
> document.getElementById("demo_head").innerHTML = "Paragraph changed.";
> }
> </script>
> ...
> </head>
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]