Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

406
Views
Symfony, using path() (javascript) in a twig

In my javascript, I need to use a route. In the Symfony's documentation, it said that I can include my script in the twig to get the route BUT my route needs a parameter, then I found

var isbn = 1234567890;
var url = {{ path('book_search_general', {'isbn': 'isbn'}) }};
url.replace("isbn", isbn);

But javascript believes that it is a regular expression. In the HTML source code it's:

var url = /public/book/isbn;
url.replace("isbn", isbn);

An I have the error:

Uncaught SyntaxError: Invalid regular expression flags
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!