6

Can somebody explain what happens in this SEDE query? It's a very simple one, apart from the use of a parameter:

PRINT ('%href="##url##"%')

but somehow SEDE decides to append part of its own submit call to the URL I specified as parameter (https://meta.stackexchange.com). This is the result:

%href="https://meta.stackexchange.com,/query/run/4/1646738/2005914"%

but I'd expect the query to produce

%href="https://meta.stackexchange.com"%

1

1 Answer 1

6

We're using Request.Params to give ParsedQuery the data to substitute into the query, which is…not the best behaviour here, because of how that is populated. Request.Form is probably more appropriate, so we get the values passed in specifically from the form.

I've submitted a PR to resolve this (in a slightly different way than described above), but in the meantime using a different parameter name would avoid the issue.

3
  • 2
    Ah, we weren't using Request.Form because of the CSV route…
    – Tim Stone
    Commented Jan 8, 2023 at 22:20
  • 2
    That gives me a decent workaround, thanks! data.stackexchange.com/meta.stackexchange/query/…
    – Glorfindel Mod
    Commented Jan 9, 2023 at 7:18
  • Is there even anyone on the other side of those PR's? Used to be only Nick and he's long gone, so wonder if it's not just waste of time. Commented Jan 9, 2023 at 13:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .