Skip to content

Commit

Permalink
bugfix - site name search - escape ' characters
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiaifrim committed Apr 23, 2021
1 parent 7b25894 commit 36abe2d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,12 @@ const OpenlayersMapView = (props) => {
axios
.get(
encodeURI(
`${config.settings.providerUrl}?query=SELECT shape_wm.STX as x, shape_wm.STY as y, Site_reporting_year from [IED].[latest].[SiteMap] WHERE siteName COLLATE Latin1_General_CI_AI LIKE '%${stateRef.current.siteTerm}%' ORDER BY [Site_reporting_year] DESC`,
`${
config.settings.providerUrl
}?query=SELECT shape_wm.STX as x, shape_wm.STY as y, Site_reporting_year from [IED].[latest].[SiteMap] WHERE siteName COLLATE Latin1_General_CI_AI LIKE '%${stateRef.current.siteTerm.replace(
"'",
"''",
)}%' ORDER BY [Site_reporting_year] DESC`,
),
)
.then((response) => {
Expand Down

0 comments on commit 36abe2d

Please sign in to comment.