rusackas commented on PR #42489:
URL: https://github.com/apache/superset/pull/42489#issuecomment-5786723141

   @gaurav0107 this had been sitting on the same open concern for a while (both 
CodeAnt and bito flagged it, and it's exactly what @rusackas suggested above — 
requiring the leading tag to actually close), so pushed a fix for it directly 
in `bd281ae6ef` rather than wait longer.
   
   `checkForHtml()` now requires the leading tag to actually close somewhere in 
the string before treating a message as an HTML page: `<div>500: Internal 
Server Error</div>` closes what it opens, `<a> is not valid syntax` doesn't. 
The `<!doctype html>` preamble case stays exempt from that check, since 
`isProbablyHTML()` already gates it on its own known-tag detection, so the 
existing bare-fragment tests still pass unchanged.
   
   Added a regression test for the exact `<a> is not valid syntax` case from 
the thread. All 279 tests across `packages/superset-ui-core/test/query`, 
`utils/html.test.tsx`, and `asyncEvent.test.ts` pass, and pre-commit's clean on 
the changed files.
   
   @rusackas want to give this one more look now that the edge case is closed?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to