By Christopher Ambler on Friday, 04 September 2020
Posted in Technical Issues
Replies 4
Likes 0
Views 703
Votes 0
Your code for autopost formatting (in (admin) includes/post/post.php) has the following line:


$content = str_ireplace(' ', ' ', $content);


Replacing a non-breaking space with an empty string is incorrect, it should be a single space. This is causing formatting errors on autoposts.
Well, it looks like your formatter munged the code - in essence, it's a replace of a non-breaking space to '' when it should replace it with ' ' (single space).

Since your post formatter puts in non-breaking spaces in interesting places (like before bold formatting that then gets stripped out in autopost), the lack of the space makes the text run together.

Simple fix
·
Friday, 04 September 2020 04:18
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for reported, perhaps you can attach one of the sample HTML content so we can run some test in locally so we can look into this? Because we need to test further with the different scenario and different editor.
·
Friday, 04 September 2020 12:35
·
0 Likes
·
0 Votes
·
0 Comments
·
I'm not sure how I could upload what the internal string looks like. When I create a post and put in a link, your code inserts non breaking spaces (ampersand, nbsp;) in the post. This is then string replaced to an empty string, when it should be a single space.

It's really that simple!
·
Saturday, 05 September 2020 10:20
·
0 Likes
·
0 Votes
·
0 Comments
·
alright, thanks.
·
Saturday, 05 September 2020 10:31
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post