« first day (2744 days earlier)      last day (2208 days later) » 

12:32 AM
I wouldn't use Regex to parse and manipulate HTML
179
Q: Using regular expressions to parse HTML: why not?

ntownsendIt seems like every question on stackoverflow where the asker is using regex to grab some information from HTML will inevitably have an "answer" that says not to use regex to parse HTML. Why not? I'm aware that there are quote-unquote "real" HTML parsers out there like Beautiful Soup, and I'm su...

 
 
4 hours later…
4:07 AM
part of the problem of regexping html in the wordpress context is that you aare going to assume that the html is valid, and if you have not created it yourself, this is going to be a problematic assumption
regexp is a heuristic that can be more than good enough for very simple cases like eliminate empty spans, but it is always better to just use a proper parser
... but talking about empty spans @MichaelEcklund, are you sure they are empty? No CSS content, no JS target?
Unless you have to do some preprocessing server side, this kind of things is better done in JS, and you benefit from the proper parsing the browser had done.
 
 
9 hours later…
12:54 PM
Hello!
I'm having trouble trying to get wp_remote_post to work with more than 1024 characters in the body.
Anyone knows what could be going on?
0
Q: wp_remote_post doesn't work with more than 1024 bytes in the body

That Brazilian GuyI'm working with a third-party API (for the intents of this question, it's irrelevant which one) and need to send a POST request to an external service. I'm trying to use wp_remote_post to achieve what I need, but there seems to be a limit to the amount of data it can send in its request body. ...

 
1:42 PM
@ThatBrazilianGuy your question is very unlikely. If you would have forced me to bet than either you have some php setting off, or you are looking at the wrong thing when debiging. There is no reason to limit outgoing communication in any way
 
@MarkKaplun Hm. So what setting should I be inspecting?
 
if you are seeing what you claim then the only option might be misbehaving plugin
 
And my debug is basically "fire it up on the wp side and see if it reaches the ngrok side", then "fire it up on postman and see if it reaches the ngrok side".
 
or that there is bug in your code and your payload is not what you think
 
@MarkKaplun Hm. Good idea. I'll try with a TwentySomething theme and a new install.
 
1:46 PM
if you are sending binary that might be a problem
 
@MarkKaplun My payload is literally a "bla bla bla bla bla (...)" string (for testing purposes, obv).
 
oh, than really this should not happen, and if it does it is a bug somewhere
 
2:23 PM
...no, same result with a brand new WP install, no plugins, running the twenty seventeen theme.
 
windows?
 
I'm running WP 4.9.5 inside a Docker container running the official WP image. Docker is hosted on a Fedora Linux PC.
 
so many points for possible misconfiguration ;) never played with docker but that sounds like an enviroment that can be overly limited
and where do you inspect the output? is it on the same docker?
 
Ok, I will try running it on my local machine. I think it will take a few hours to get it working, it's been more than a year since I stopped running php and mysql locally.
@MarkKaplun I inspect the output either on Firefox or ngrok running on the host (my laptop).
 
 
1 hour later…
3:33 PM
@ThatBrazilianGuy keep in mind that this is official in the sense that the docker people officially made it. WP had nothing to do with that images creation
 
3:49 PM
@TomJNowell Yeah, that makes sense.
 

« first day (2744 days earlier)      last day (2208 days later) »