case-insensitive detection
-
Hey –
Suggestion for improvement: Some old content has captialized HTML tags – e.g. “<IMG” instead of “<img”.
I’d suggest you adjust the plugin code to account for this, by adding the case-insensitive flag (“/i”) to the end of your regex calls. That is, in “import-external-attachments.php”, around line 309-310, adjust the regex calls to:
preg_match_all( '/<img[^>]* src=[\'"]?([^>\'" ]+)/i' , $post->post_content , $matches ); preg_match_all( '/<a[^>]* href=[\'"]?([^>\'" ]+)/i' , $post->post_content , $matches2 );
And btw – thanks for maintaining this plugin! Helping a client move from another CMS to WordPress, and we don’t have full access to the old site – so this saved me hours of manual import work!
FWIW,
twykr.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘case-insensitive detection’ is closed to new replies.