Skip to content

Filtering uf-tables with & causes them to stop working #1283

@vinc10

Description

@vinc10

Affected sprinkle or package

userfrosting/theme-adminlte

UserFrosting or package Version

5.1.4

Debug Data

docker compose exec app php bakery debug
WARN[0000] /home/Vincent/git/UF 5 skeleton/UserFrosting/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 

UserFrosting Environnement Information
======================================

 -------------------- ---------------- 
  Framework version    5.1.4           
  OS Name              Linux           
  Main Sprinkle        My Application  
  Main Sprinkle Path   /app/app/       
  Environment mode     default         
  PHP Version          8.2.25          
  Node Version         v18.20.4        
  NPM Version          10.7.0          
 -------------------- ---------------- 


Loaded Sprinkles
================

 ------------------ --------------------------------------- ------------------------------------------------------- 
  Sprinkle           Namespace                               Path                                                   
 ------------------ --------------------------------------- ------------------------------------------------------- 
  Core Sprinkle      UserFrosting\Sprinkle\Core\Core         /app/vendor/userfrosting/sprinkle-core/app/src/../     
  Account Sprinkle   UserFrosting\Sprinkle\Account\Account   /app/vendor/userfrosting/sprinkle-account/app/src/../  
  AdminLTE Theme     UserFrosting\Theme\AdminLTE\AdminLTE    /app/vendor/userfrosting/theme-adminlte/app/src/../    
  Admin Sprinkle     UserFrosting\Sprinkle\Admin\Admin       /app/vendor/userfrosting/sprinkle-admin/app/src/../    
  My Application     UserFrosting\App\MyApp                  /app/app/src/../                                       
 ------------------ --------------------------------------- ------------------------------------------------------- 


Database config
===============

 ------------ -------------- 
  CONNECTION   mysql         
 ------------ -------------- 
  DRIVER       mysql         
  HOST         mysql         
  PORT         3306          
  DATABASE     userfrosting  
  USERNAME     docker        
  PASSWORD     *********     
 ------------ -------------- 


Testing database connection...
==============================

                                                                                                                    
 [OK] Database connection successful

Chat Discussion (optional)

No response

Description

Tested on skeleton 5.1.4 and my custom application running 5.1.4

Filtering tables using some spcial characters, such as &, breaks uf-tables. Follow the steps to reproduce and this error shows up in the console:

query-string.js:48 Uncaught TypeError: Cannot read properties of null (reading 'length')
at Object.deparam (query-string.js:48:30)
at push../node_modules/@userfrosting/theme-adminlte/app/assets/userfrosting/js/uf-table.js.Plugin._cleanHash (uf-table.js:672:1)
at Object.proxy [as sort2Hash_cleanHash] (jquery.js:10615:1)
at Object.cleanHash (widget-sort2Hash.js:202:1)
at String. (widget-sort2Hash.js:227:1)
at Function.each (jquery.js:389:1)
at Object.setHash (widget-sort2Hash.js:226:1)
at HTMLTableElement. (widget-sort2Hash.js:58:1)
at HTMLTableElement.dispatch (jquery.js:5145:1)
at elemData.handle (jquery.js:4949:1)

Steps To Reproduce

1: Go to users page http://localhost:8080/users
2: Enter a & into any column filter
3: Error can be seen in console log. Actions drop down options don't bind to their modals. Table often freezes when in this state.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    References

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions