« first day (1655 days earlier)      last day (3289 days later) » 

8:28 AM
With all this security updates I am actually close to re-evaluating my decision to turn my back on composer and switch back to auto-updates.
Or anyone here who does this with 4.2.* in his composer.json and a cron?
 
I don't know =/
 
 
4 hours later…
12:07 PM
Guys need a simple suggestion:

For a textarea array input as serialization I did sanitization like below:
$response_msgs_array = $_POST['ext_response']; //array
$response_msgs = array_map( 'utf8_encode', $response_msgs_array ); //sanitize
$response_msgs = array_map( 'esc_textarea', $response_msgs_array ); //sanitize

//suppose my finalized array is like below:
$output = array( 1 => 'texts from textarea', 78 => 'texts from textarea with malicious script like <script>alert('Malicious script')<script>' );
 
 
2 hours later…
1:42 PM
thoughts:

- mysql_real_escape_string will fail if there's no mysql extension
- escape late, escape often, even if you escaped on save, always escape on output, as late as possible
- I'm not so sure you need a single meta field with a serialised array of items, just have each item in its own meta key value pair, and when you retrieve them, ask for all not just 1
 
@TomJNowell Thanks a lot
I'm going for a new approach
Just in a chat with @Sisir
 
I would note that I tend to follow .com/VIP standards now more than Core/.org, which are a lot stricter
give vip.wordpress.com/documentation a look through :)
 
@TomJNowell That's a good suggestion. Thanks a lot
 
Crazy pricing lol.. they are really looking for VIPs
 
not so crazy for the clients we have though
probably on the cheaper end of the scale
 
1:58 PM
yeah those aren't your grandma's blogs hosted there
 
speak for your grandma only :)
2
 
2:14 PM
ha ha
 
3:07 PM
Quick question for all the brains here:
I'm thinking of automatically creating an in-page anchor based navigation from headlines in post content. Any smarter idea then regexing this from the final output?
 
3:59 PM
@kraftner How can we grab all the headings without regexing? From my POV regexing is the key - apart from jQuery.
 
Well there would also be the PHP DOM Parser https://php.net/manual/en/book.dom.php#book.dom or some other library.
And maybe something else I haven't thought of. That is why I'm asking :)
 
 
4 hours later…
7:50 PM
@kraftner Symfony Dom Crawler if you are doing it in PHP... there are JS scripts too, I use one on composer.rarst.net
 
 
1 hour later…
9:10 PM
Before I ask this question on stack, is this still the proper way *not* save post_meta on revisions?

if( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) ) {
return;
}
 
10:01 PM
@Howdy_McGee wp_is_post_revision( $post )
 

« first day (1655 days earlier)      last day (3289 days later) »