Open gpapp opened 4 years ago
To get the content of the post properly, one must use the query. To fix the character coding issues the parsed HTML needs a meta tag to specify the encoding used.
Instead of the line in the rest_api.php in the import_html($request) function
$html = $request['html'] ?? get_the_content(null, false, $post_id);
This dirty hack can be used
$query = get_post($post_id);
$html = '<?xml encoding="utf-8" ?>'.apply_filters('the_content', $query->post_content);
N.B. This hack knowingly does NOT care about the encoding of your site and forces UTF-8.
Encoding issue fixed in v3.5.0, but the original issue remains, /more tags break the_post_content evaluation
There are bogus error messages due to the libXML validation, that can be avoided by the following as suggested here
// fix html5/svg errors
libxml_use_internal_errors(true);
The post in entirety can not be fetched with
$html = $request['html'] ?? get_the_content(null, false, $post_id);
if it contains the /more tag. Using the post already loaded in the episode variable, it is better to use:
$html = $request['html'] ?? apply_filters('the_content', $episode->post()->post_content);
This bug still persists in 3.8.1. Quite sad, because otherwise this is an excellent feature!
Multiple errors occur when trying to process longer articles like: https://podcast.itworks.hu/jesus-caesar-napoleon-a-zartosztalyon/
Expected behavior
All links that are in the article added to the shownotes using the text of the links in their description
Actual behavior
Processing stops on the
--more--
tag. Probably not the full text, but the excrept is used for processing. If the tag is removed the links are extracted from the text, but the UTF-8 encoded strings are used as an 8-bit string changing all local characters to garbage.System information (see
Podlove > Support
menu)