<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - xdg-open under LXDE treats all URLs as local files"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=106585">106585</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>xdg-open under LXDE treats all URLs as local files
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Portland
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>xdg-utils
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>portland-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>fdeskbugs1@biz.qcoder.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>First noticed in xdg-utils v1.1.3-1. In xdg-open's function open_lxde(), it's
using shell operator '-a' when it should use '&&'. That causes all URLs to be
opened with pcmanfm, and that's broken for URLs such as <a href="https://example.com">https://example.com</a>.

Here's the fix:

--- xdg-open.bad
+++ xdg-open.good
@@ -939,7 +939,7 @@ open_lxde()
 {

     # pcmanfm only knows how to handle file:// urls and filepaths, it seems.
-    if pcmanfm --help >/dev/null 2>&1 -a is_file_url_or_path "$1"; then
+    if pcmanfm --help >/dev/null 2>&1 && is_file_url_or_path "$1"; then
         local file="$(file_url_to_path "$1")"

         # handle relative paths</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>