[1/3] docs: Use google sitesearch for website search

Message ID dc3cfd11774a302a8569137735dced0160b2220f.1554329992.git.crobinso@redhat.com
State New
Headers show
Series
  • Remove website search, just use google
Related show

Commit Message

Cole Robinson April 3, 2019, 10:26 p.m.
The website search is perpetually broken, has had XSS issues in the
past, and I suspect when it's working it's not as fast or capable as
a simple google site:libvirt.org search

Replace the <form> implementation with one that sends the user to
google.com with 'site:libvirt.org' appended to the search string

Signed-off-by: Cole Robinson <crobinso@redhat.com>

---
 docs/page.xsl | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

-- 
2.21.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Comments

Daniel P. Berrangé April 4, 2019, 2:24 p.m. | #1
On Wed, Apr 03, 2019 at 06:26:49PM -0400, Cole Robinson wrote:
> The website search is perpetually broken, has had XSS issues in the
> past, and I suspect when it's working it's not as fast or capable as
> a simple google site:libvirt.org search
> 
> Replace the <form> implementation with one that sends the user to
> google.com with 'site:libvirt.org' appended to the search string
> 
> Signed-off-by: Cole Robinson <crobinso@redhat.com>
> ---
>  docs/page.xsl | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
Ján Tomko April 4, 2019, 2:35 p.m. | #2
On Wed, Apr 03, 2019 at 06:26:49PM -0400, Cole Robinson wrote:
>The website search is perpetually broken, has had XSS issues in the

>past, and I suspect when it's working it's not as fast or capable as

>a simple google site:libvirt.org search

>

>Replace the <form> implementation with one that sends the user to

>google.com with 'site:libvirt.org' appended to the search string

>

>Signed-off-by: Cole Robinson <crobinso@redhat.com>

>---

> docs/page.xsl | 9 ++++-----

> 1 file changed, 4 insertions(+), 5 deletions(-)

>

>diff --git a/docs/page.xsl b/docs/page.xsl

>index 4698e2789e..3d007f486c 100644

>--- a/docs/page.xsl

>+++ b/docs/page.xsl

>@@ -155,11 +155,10 @@

>             </ul>

>           </div>

>           <div id="search">

>-            <form action="{$href_base}search.php" enctype="application/x-www-form-urlencoded" method="get">

>-              <div>

>-                <input name="query" type="text" size="12" value=""/>

>-                <input name="submit" type="submit" value="Go"/>

>-              </div>

>+            <form action="https://www.google.com/search" menctype="application/x-www-form-urlencoded" method="get">


s/menctype/enctype/ ?

Jano

>+              <input name="sitesearch" type="hidden" value="libvirt.org"/>

>+              <input name="q" type="text" size="12" value=""/>

>+              <input type="submit" value="Go"/>

>             </form>

>           </div>

>         </div>

>-- 

>2.21.0

>

>--

>libvir-list mailing list

>libvir-list@redhat.com

>https://www.redhat.com/mailman/listinfo/libvir-list
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Cole Robinson April 4, 2019, 10:49 p.m. | #3
On 4/4/19 10:35 AM, Ján Tomko wrote:
> On Wed, Apr 03, 2019 at 06:26:49PM -0400, Cole Robinson wrote:

>> The website search is perpetually broken, has had XSS issues in the

>> past, and I suspect when it's working it's not as fast or capable as

>> a simple google site:libvirt.org search

>>

>> Replace the <form> implementation with one that sends the user to

>> google.com with 'site:libvirt.org' appended to the search string

>>

>> Signed-off-by: Cole Robinson <crobinso@redhat.com>

>> ---

>> docs/page.xsl | 9 ++++-----

>> 1 file changed, 4 insertions(+), 5 deletions(-)

>>

>> diff --git a/docs/page.xsl b/docs/page.xsl

>> index 4698e2789e..3d007f486c 100644

>> --- a/docs/page.xsl

>> +++ b/docs/page.xsl

>> @@ -155,11 +155,10 @@

>>             </ul>

>>           </div>

>>           <div id="search">

>> -            <form action="{$href_base}search.php"

>> enctype="application/x-www-form-urlencoded" method="get">

>> -              <div>

>> -                <input name="query" type="text" size="12" value=""/>

>> -                <input name="submit" type="submit" value="Go"/>

>> -              </div>

>> +            <form action="https://www.google.com/search"

>> menctype="application/x-www-form-urlencoded" method="get">

> 

> s/menctype/enctype/ ?

> 


Nice catch, the attribute misgendering was not intended. Fixed before
pushing

Thanks,
Cole

> 

>> +              <input name="sitesearch" type="hidden"

>> value="libvirt.org"/>

>> +              <input name="q" type="text" size="12" value=""/>

>> +              <input type="submit" value="Go"/>

>>             </form>

>>           </div>

>>         </div>

>> -- 

>> 2.21.0

>>

>> -- 

>> libvir-list mailing list

>> libvir-list@redhat.com

>> https://www.redhat.com/mailman/listinfo/libvir-list



- Cole

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Patch

diff --git a/docs/page.xsl b/docs/page.xsl
index 4698e2789e..3d007f486c 100644
--- a/docs/page.xsl
+++ b/docs/page.xsl
@@ -155,11 +155,10 @@ 
             </ul>
           </div>
           <div id="search">
-            <form action="{$href_base}search.php" enctype="application/x-www-form-urlencoded" method="get">
-              <div>
-                <input name="query" type="text" size="12" value=""/>
-                <input name="submit" type="submit" value="Go"/>
-              </div>
+            <form action="https://www.google.com/search" menctype="application/x-www-form-urlencoded" method="get">
+              <input name="sitesearch" type="hidden" value="libvirt.org"/>
+              <input name="q" type="text" size="12" value=""/>
+              <input type="submit" value="Go"/>
             </form>
           </div>
         </div>