gitcoinco / gitcoinco/web

JS comment appears in html

Open Beginner friendly
#10,818 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.8k
Forks
776
PR merge metrics
No merged PRs in 30d

Description

**Overview**
A JavaScript comment `(// var web3 = Web3 ? new Web3(Web3.givenProvider || "ws://localhost:8546") : null;`) shows up in the rendered html template.

The associated django html template seems to be [this one](https://github.com/gitcoinco/web/blob/e6ad25ad8a12257e62dead00febd5254e501a1d3/app/grants/templates/grants/shared/shared_scripts.html).

**Steps To Reproduce**
Steps to reproduce the behavior:
1. Go to 'https://gitcoin.co/hackathon/moneylegos/projects/16605/pensionfi'
2. See js comment in html

**Observed behavior**
JS comment appears in the UI.

**Expected behavior**
Nothing shall be rendered there
.
**Screenshots**
![image](https://user-images.githubusercontent.com/33185243/188233951-7a5fec0e-7835-4240-b903-b8b60cbe8dcc.png)

**Additional context**
browser: Brave

Contributor guide

Open the contributing guide

Research direction

Inspect app/grants/templates/grants/shared/shared_scripts.html and reproduce the issue at the linked pensionfi page. Verify how the JavaScript comment is included in the rendered template, then confirm that the comment no longer appears in the UI or page output.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, javascript
Domain
frontend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.