You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some opportunities, the front-end is giving 500 errors when trying to render the page.
@chouinar believes this is because the opportunity summary description contains malformed HTML:
. On a hunch, I just copied one of them to my local DB and the local frontend now fails with:
⨯ Error: Malformed markup: improperly closed tag
at Array.from.reduce.preSplit (./src/utils/generalUtils.ts:36:23)
at Array.reduce ()
at splitMarkup (./src/utils/generalUtils.ts:20:62)
at SummaryDescriptionDisplay (./src/components/opportunity/OpportunityDescription.tsx:74:104)
at stringify ()
at stringify ()
digest: "3520062763"
38 | if (tracker.openTagIndicator && character === "/") {
39 | if (tracker.closeTagIndicator) {
40 | throw new Error("Malformed markup: improperly closed tag");
| ^
41 | }
42 | tracker.closeTagIndicator = true;
43 | }
⨯ src/utils/generalUtils.ts (40:17) @ Array.from.reduce.preSplit
⨯ Error: Malformed markup: improperly closed tag
at Array.from.reduce.preSplit (./src/utils/generalUtils.ts:36:23)
at Array.reduce ()
at splitMarkup (./src/utils/generalUtils.ts:20:62)
at SummaryDescriptionDisplay (./src/components/opportunity/OpportunityDescription.tsx:74:104)
at stringify ()
at stringify ()
We think this affects, at maximum, 20% of opportunity listings: from @chouinar again, "I’ve looked into it before as the frontend wanted to know how common HTML tags were. It was somewhere in the 10-20% range." Hopefully not all those listings contain malformed HTML.
It feels like, from poking around, it probably affects more like 2% of listings, maybe. We don't know yet. Google Analytics or New Relic might have more info.
Reproducibility
I tried multiple times and saw the bug every time
How to reproduce the bug
Visit any of the following opportunity listings, which are all from USDA-FNS1:
Summary
For some opportunities, the front-end is giving 500 errors when trying to render the page.
@chouinar believes this is because the opportunity summary description contains malformed HTML:
We think this affects, at maximum, 20% of opportunity listings: from @chouinar again, "I’ve looked into it before as the frontend wanted to know how common HTML tags were. It was somewhere in the 10-20% range." Hopefully not all those listings contain malformed HTML.
It feels like, from poking around, it probably affects more like 2% of listings, maybe. We don't know yet. Google Analytics or New Relic might have more info.
Reproducibility
I tried multiple times and saw the bug every time
How to reproduce the bug
https://simpler.grants.gov/opportunity/356878
https://simpler.grants.gov/opportunity/356877
https://simpler.grants.gov/opportunity/356876
https://simpler.grants.gov/opportunity/309362
Browser
Chrome
Code of Conduct
The text was updated successfully, but these errors were encountered: