tmwnn
Forum Replies Created
-
I got it to work using the following:
echo 'RW.initRating("' . $urid . '", {title: "' . esc_js(preg_replace('\xe2\x80\xa8', '', $data["title"])) . '", url: "' . esc_js($data["permalink"]) . '"' .But that is specific to the exact problem character of u2028 in this case. Would of course be better to have a general solution.
I see the two u+2028 characters which must be causing the issue. And, I think I stumbled onto the Stackoverflow entry you are working from looking for a way to strip those characters out with PHP.
Does this help any?
Nope.
(it’s easy for me to keep pasting variations into the editor and saving).
That replacement also had no effect.
I’ll try, but I can’t really understand what you are trying to accomplish there. I’m sure I’m just missing something in the big picture. I see that you are trying to strip out a regex of octal character codes, but I don’t understand why the plugin ever needs to look at (be affected by) the content of the comments at all?
Why not just associate the comment-id with your back end db and completely ignore the content? What am I missing?
I am a developer – I completely understand.
But this is not my blog; I am a hired admin and my job is to keep the site up and secure and so I just don’t feel comfortable with giving anyone access to the back end.
Sorry, it didn’t work.
Same result after making that change.
I assume that I could just edit the offending comment and strip out any hidden characters for a quick-fix, but I will hold off on doing that so we can try to come up with a way to filter out hidden characters at the plugin level so this kind of thing doesn’t happen for anyone else in the future.
Hi thanks for posting the response. I’m sorry if I mis-typed my email address on the form.
I can’t provide admin access to the wordpress install, but I can make any changes to the code of the plugin that you want to test if you can tell me what to change in which file.
Thanks for the link. I filled out the form on that support site, receiving a message saying that I would be contacted in one business day. If your diagnosis is correct and you know what characters are problematic and where they appear in the comments, I could fix it myself right away…