Skip to content

Commit

Permalink
found a bug in 1.1.0 patching
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Luck committed Jan 7, 2017
1 parent 62cfa88 commit 7daa6fe
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
###Changelog


####1.1.1

* Really fixed the problem this time.

####1.1.0

* Fixed problem with WordPress creating <img> and <hr> tags that are not XHTML compliant.

####1.0.0

* Ensuring 4.x WP compatibility
* Upgraded to ensure that social sharing plugins do not break feed to Amazon.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Tags: kindle, ebook, periodical, publisher, magazine, electronic, amazon
Requires at least: 3.2.0
Tested up to: 4.1.0
Stable Tag: 1.1.0
Stable Tag: 1.1.1
License : GPLv2 or later
License URI : http://www.gnu.org/licenses/gpl-2.0.html

Expand Down
5 changes: 3 additions & 2 deletions includes/KindleFeed.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,10 @@ public function strip_content($data_str) {

// Need to fix places where HTML and XHTML don't match
// Thoughts from: http://syrkos.com/blog/2013/04/25/make-html-xhtml-compliant-without-tidy/
// Helper: http://regexr.com/
public function fix_bad_xml($xml) {
$xml = preg_replace("/<img([^>]+)\>/i", "<img $1/>", $xml);
$xml = preg_replace("/<hr([^>]*)\>/i", "<hr $1/>", $xml);
$xml = preg_replace("/<img([^>\/]+)\>/i", "<img $1/>", $xml);
$xml = preg_replace("/<hr([^>\/]*)\>/i", "<hr $1/>", $xml);
$replace = ['&nbsp;' => ''];
$xml = strtr($xml, $replace);
return $xml;
Expand Down
2 changes: 1 addition & 1 deletion kindle-feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Kindle Periodical Manager
Plugin URI: http://www.loudlever.com/wordpress-plugins/kindle-periodical-manager/
Description: Organize and format your 'Posts' as required by Amazon for <a href='https://kindlepublishing.amazon.com/gp/vendor/kindlepubs/kpp/kpp-home' target='_blank'>Kindle for Periodicals</a>.
Version: 1.1.0
Version: 1.1.1
Author: Loudlever
Author URI: http://www.loudlever.com
Expand Down
5 changes: 5 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ If you have any questions not addressed here, [please email us](mailto:wordpress

== Changelog ==

= 1.1.1 =

* Really fixed the problem this time.

= 1.1.0 =

* Fixed problem with WordPress creating <img> and <hr> tags that are not XHTML compliant.

= 1.0.0 =
Expand Down

0 comments on commit 7daa6fe

Please sign in to comment.