Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

149
Visualizações
Nested quotes in html page

I have a button in my html code to reset password that have nested quotes

<button type="" class="btn btn-primary" onclick="window.location.href='{% url 'password_reset' %}'">Forgot Password</button>

The button work on site and doesn't seem to have any problem so far. But my VS Code give me the following problem

';' expected.

Should I be concerned about this problem?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Technically no, since semicolons in javascript are used to seperate statements and there is only one line of code in this nested quote. There is also automatic semicolon insertion after every line therefore will still work when running. However, it is always encouraged to add semicolons after each statement to make the code easier to read and just simply look better. This can also ensures the consistency of the code incase JS wrongly interpert it. But in this case, it is your choice to decide whether to add the semicolon or to ignore the warning. Try "window.location.href='{% url 'password_reset' %};'" to fix the issue

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda