Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing a pound sign as a value in the query string of a URL, using Angular

Tags:

angularjs

I have an input tag and on input it will filter a list of data in a table according to the input value. That value is passed via the query string in the request URL. Typically I get data returned and the table is updated appropriately. However, when searching for the pound sign (#), I am receiving a 500 internal server error. My question is there a known issue with Angular when passing a pound sign in the query string?

like image 523
rachiebytes Avatar asked Mar 15 '23 04:03

rachiebytes


1 Answers

To pass reserved characters in URLs, you need to use percent encoding. For #, it's %23.

The wikipedia page for Percent Encoding has a nice lookup table.

like image 197
TJ Ellis Avatar answered Apr 24 '23 21:04

TJ Ellis