While attempting the Google Gruyeres XSS challenges at , I encountered an interesting code snippet from their stored AJAX XSS challenge:
all <span style=display:none>"
+ (alert(1),"")
+ "</span>your base
The intriguing part is: (alert(1),"")
As per the solution provided, an empty string should be returned. However, in my testing, the alert(1) still executes.
Could this be some kind of function shorthand? Why does it trigger the alert, but then return an empty string?
I appreciate any guidance on this matter!
Warm regards,
Rolf