Start a new topic

Posting SQL in code block breaks posting

 So, I did tonight's Hanukkah of Data, and decided to post about it. And among the post, I included a code snippet.


```
SELECT * FROM noahscustomers
WHERE starts_with(phone, '4') AND char_length(substring(name, '([^[:space:]]+)(?:,|$)')) = 10
ORDER BY substring(name, '([^[:space:]]+)(?:,|$)')
```


It was within a code block, but when I tried to post it, the post page hung forever and went unresponsive. I tried multiple times, to no avail. Eventually, I cut out the SQL block, and suddenly it posted nearly instantly.


1 person has this problem

Additionally, when I tried to edit the post to add the SQL without the code block, the edit "went through" and sent me back to the homepage, only for the post to be completely unchanged.

I ran into what I believe in the same issue with posting an HTML code block, here is the full source of the post: https://gist.github.com/guregu/4e5508db7d1321d57aec2a63a164ebc7


Looking at the network requests tab, it seems that Cloudflare's XSS firewall is being overzealous and returning a 403 (with HTML content), and that trips up the post dialog. 

Login or Signup to post a comment