@@ -73,30 +73,37 @@ jQuery(function ($) {
73
73
} ) ;
74
74
// Set query string options
75
75
if ( datasources . persistent . length !== 0 )
76
- queryString . push ( 'datasources=' + datasources . persistent . map ( encodeURIComponent ) . join ( ';' ) ) ;
76
+ queryString . push ( 'datasources=' + datasources . persistent . map ( encodeURIComponentExtended ) . join ( ';' ) ) ;
77
77
if ( datasources . transient . length !== 0 )
78
- queryString . push ( 'transientDatasources=' + datasources . transient . map ( encodeURIComponent ) . join ( ';' ) ) ;
78
+ queryString . push ( 'transientDatasources=' + datasources . transient . map ( encodeURIComponentExtended ) . join ( ';' ) ) ;
79
79
if ( ! hasDefaultQuery )
80
- queryString . push ( 'query=' + encodeURIComponent ( options . query || '' ) ) ;
80
+ queryString . push ( 'query=' + encodeURIComponentExtended ( options . query || '' ) ) ;
81
81
if ( ! hasDefaultQuery && options . queryContext )
82
- queryString . push ( 'queryContext=' + encodeURIComponent ( options . queryContext || '' ) ) ;
82
+ queryString . push ( 'queryContext=' + encodeURIComponentExtended ( options . queryContext || '' ) ) ;
83
83
if ( ! hasDefaultQuery && options . queryFormat !== 'sparql' )
84
- queryString . push ( 'resultsToTree=' + encodeURIComponent ( options . resultsToTree ) ) ;
84
+ queryString . push ( 'resultsToTree=' + encodeURIComponentExtended ( options . resultsToTree ) ) ;
85
85
if ( options . queryFormat !== 'sparql' )
86
- queryString . push ( 'queryFormat=' + encodeURIComponent ( options . queryFormat || '' ) ) ;
86
+ queryString . push ( 'queryFormat=' + encodeURIComponentExtended ( options . queryFormat || '' ) ) ;
87
87
if ( options . datetime )
88
- queryString . push ( 'datetime=' + encodeURIComponent ( options . datetime ) ) ;
88
+ queryString . push ( 'datetime=' + encodeURIComponentExtended ( options . datetime ) ) ;
89
89
if ( options . httpProxy )
90
- queryString . push ( 'httpProxy=' + encodeURIComponent ( options . httpProxy ) ) ;
90
+ queryString . push ( 'httpProxy=' + encodeURIComponentExtended ( options . httpProxy ) ) ;
91
91
if ( options . bypassCache )
92
- queryString . push ( 'bypassCache=' + encodeURIComponent ( options . bypassCache ) ) ;
92
+ queryString . push ( 'bypassCache=' + encodeURIComponentExtended ( options . bypassCache ) ) ;
93
93
if ( options . executeOnLoad )
94
- queryString . push ( 'executeOnLoad=' + encodeURIComponent ( options . executeOnLoad ) ) ;
94
+ queryString . push ( 'executeOnLoad=' + encodeURIComponentExtended ( options . executeOnLoad ) ) ;
95
95
if ( options . solidIdp && options . solidAuth . defaultIdp !== options . solidIdp )
96
- queryString . push ( 'solidIdp=' + encodeURIComponent ( options . solidIdp ) ) ;
96
+ queryString . push ( 'solidIdp=' + encodeURIComponentExtended ( options . solidIdp ) ) ;
97
97
98
98
// Compose new URL with query string
99
99
queryString = queryString . length ? '#' + queryString . join ( '&' ) : '' ;
100
100
history . replaceState ( null , null , location . href . replace ( / (?: # .* ) ? $ / , queryString ) ) ;
101
101
}
102
102
} ) ;
103
+
104
+ // encodeURIComponent function extended with encoding for parenthesis
105
+ function encodeURIComponentExtended ( component ) {
106
+ return encodeURIComponent ( component )
107
+ . replace ( / \( / g, '%28' )
108
+ . replace ( / \) / g, '%29' ) ;
109
+ }
0 commit comments