Around 5,603 errors are coming from an unknown source on French Wikipedia across a 12 hour period. The error is not normalized but is of the form
"(Uncaught Error: Syntax error, unrecognized expression: [id=*)"
for example: "Uncaught Error: Syntax error, unrecognized expression: [id='Tentative_d'assassinat'] "
What's likely is a gadget/user script/extension/banner is trying to construct a jQuery selector programmatically but is not escaping the single quote character. The stack trace provides few clues due to a lack of named functions or the source of the gadget.
The offending code likely looks something like this: $("[id='"+anchor+"']");
Being able to determine whether this is impacting anonymous users, whether it originates from a banner would be needed to diagnose further.
https://logstash.wikimedia.org/goto/400c81dfa8b301126b24f225402305cc