Some links don't work in Firefox with uBlock Origin
Overview
If I surf my CiviCRM installation with the Firefox extension uBlock Origin enabled and try to view a member, I get redirected to the front page, and this error message in the upper right corner:
Error We could not find a contact id.
I managed to get the member to show via another method (I have a custom Drupal list) but when I click on "Contributions" or "Memberships" I get these errors:
Error Could not find valid value for cid
Network Error Unable to reach the server. Please refresh this page in your browser and try again.
If I disable uBlock Origin, the problem goes away.
In the browser address field, slashes and question marks are transformed, to look like this:
https://mysite.ddev.site/civicrm/contact/view%3Fcid%3D5773%26reset%3D1?selectedChild=summary
Could that be the cause? I believe this behaviour started after updating from version 5.43.2 to 5.51.1.
Reproduction steps
- Install and enable uBlock Origin in Firefox
- Click on Search -> Find Members
- Click on Search button
- Click on a member
- Get an error "Error: > We could not find a contact id."
Environment information
- Browser: Firefox 117.0.1
- Browser extension: uBlock Origin
- CiviCRM: Master/5.60.0
- PHP: 7.4
- CMS: Drupal 7.97
- Database: MariaDB 10.4
- Web Server: Apache 2.4 AND Nginx 1.16
Possible solution
Would not HTML-encoding the links allow it to work with uBlock Origin?