PHP-generated three dots in […] are one character! ??
-
Hi!
I have a very strange problem that I just found out the reason to! (However I do not have a solution, that’s why I post this)When i write a blog post (the normal way, in the admin-panel) and write these characters “[…]” in my text – then they are interpreted by functions.php as they should, transforming into a magnificent Read More-link. However – the php-generated “[…]” that follows automatically where the
the_excerpt
chops off the text seems to be a totally different animal. It does not get picked up by the function in functions.php.
(My functions.php-file)function excerpt_ellipse($text) { return str_replace(' [...]', ' <a href="'.get_permalink().'"><br />Read more</a>', $text); } add_filter('the_excerpt', 'excerpt_ellipse');
Then, I tried to copy the generated ellipse characters […] from the web page in the browser; turns out that the three dots in the middle are interpreted as ONE character – so I tried to copy this whole character together with the []’s from the web page, and pasted it into functions.php, replacing the original […]. (I hope you follow me here, this was quite difficult to explain!) But unfortunately it doesn’t work either. I also tried to copy them(it) to Notepad, as to make sure no formatting comes along with it, and Notepad also treat these tree dots as a single character.
Anyone had the same problem? And could help me with the solution..?
- The topic ‘PHP-generated three dots in […] are one character! ??’ is closed to new replies.