diff --git a/page/using-jquery-core/faq/how-do-i-select-an-element-by-an-id-that-has-characters-used-in-css-notation.md b/page/using-jquery-core/faq/how-do-i-select-an-element-by-an-id-that-has-characters-used-in-css-notation.md index c29fcdd9..d21661a9 100644 --- a/page/using-jquery-core/faq/how-do-i-select-an-element-by-an-id-that-has-characters-used-in-css-notation.md +++ b/page/using-jquery-core/faq/how-do-i-select-an-element-by-an-id-that-has-characters-used-in-css-notation.md @@ -25,7 +25,7 @@ The following function takes care of escaping these characters and places a "#" ``` function jq( myid ) { - return "#" + myid.replace( /(:|\.|\[|\]|,)/g, "\\$1" ); + return "#" + myid.replace( /(:|\.|\[|\]|,)/g, "\\\\$1" ); } ```