Given a query like where a variable is a substring of another variable name
select *
where {
[] rdfs:label ?__label ;
skos:prefLabel ?__label2 .
}
If the request URL includes the label parameter e.g. ?label=foo then the resulting query is invalid. Whereby the string ?__label is replaced by "foo":
select *
where {
[] rdfs:label "foo" ;
skos:prefLabel "foo"2 .
}
The logic for rewriting the queries should be more robust than simply replacing strings in the query text to account for this.