Forum

Notifications
Clear all

[3.5] Special HTML characters being converted into "r" code

Azurite
(@azurite)
Estimable Member

I use a number of "special" characters in my fics, such as é, ellipses, and em-dashes. Due to certain sites restricting HTML, I usually use the num-code for these characters, e.g.

—

and the like. But I've been noticing that many of them get converted to codes like r30; or r04; whenever I preview or edit an added story of mine. I want to ensure I don't persistently have to go into the HTML of each chapter and test out possible fixes, e.g. change it from num-code to the standard HTML special-character syntax (because, again, some sites don't accept it, and I've found the num-code to be more universally recognized). I don't know if this is an eFic thing or a TinyMCE thing.

I've gone into the site settings section of the Admin Panel and added the num codes, but they get converted to their actual form-- that is, instead of displaying the code for an em-dash or an ellipsis, it shows the actual em-dash and ellipsis! I don't know if that means they will be "allowable" in text or not. It doesn't look that way, based on this chapter I recently uploaded (I uploaded it before I made the above changes in the site settings, but wouldn't allowing a new range of characters/tags mean they show up properly? Or no?):

http://drfa.seventh-star.net/viewstory.php?sid=1&chapter=27

This story I recently added, but for some reason, it's not showing up on the Recently Updated block. I was having the Fatal Error mention in previous posts, but I'm not sure if I fixed it, so please let me know if you can't access this chapter.

The help dialog on the site settings panel mentions TinyMCE stripping or "cleaning up" HTML, but I can't find any documentation in the plugin as to WHAT exactly it does or how you can modify what TinyMCE allows/refuses.

Help?

Thank you!

Archive: Dragonfayth
eFiction: 3.5.5
Latest Patch(es): Yes
bridged?: No
modified?: Yes
PHP: 5.3.27
MySQL: 5.5.42-cll

Quote
Topic starter Posted : 06/04/2009 4:35 am
Carissa
(@carissa)
Member Moderator

Someone asked about this in the support forums, and she is not using TinyMCE so I don't think it has anything to do with that. Do you have a test account on your site? I want to look at it, but I'm not registered.

ReplyQuote
Posted : 08/04/2009 12:18 am
Azurite
(@azurite)
Estimable Member

Yes; the username is Test Account and the password is t3st3r.

Archive: Dragonfayth
eFiction: 3.5.5
Latest Patch(es): Yes
bridged?: No
modified?: Yes
PHP: 5.3.27
MySQL: 5.5.42-cll

ReplyQuote
Topic starter Posted : 08/04/2009 12:21 am
Carissa
(@carissa)
Member Moderator

I don't see the problem. What browser and operating system are you using?

ReplyQuote
Posted : 08/04/2009 12:24 am
Azurite
(@azurite)
Estimable Member

Mac OS X 10.5.6, Firefox 3.0.8.

I may have fixed the problem inadvertently by adding the special character num codes to the Allowed Tags field, even though I wasn't sure if they counted as "tags," being that they're not enclosed in angle brackets. Furthermore, I don't know if adding them in that manner also allows the long-hand form of the characters, e.g.

…

to come through, not just the num-code version.

Archive: Dragonfayth
eFiction: 3.5.5
Latest Patch(es): Yes
bridged?: No
modified?: Yes
PHP: 5.3.27
MySQL: 5.5.42-cll

ReplyQuote
Topic starter Posted : 08/04/2009 1:00 am
Carissa
(@carissa)
Member Moderator

Could you try uploading a new story as a test? I don't see the special characters at all when I view your source and I should be seeing them...Adding them to the allowed tags shouldn't work but maybe it did.

ReplyQuote
Posted : 08/04/2009 5:45 pm
Tammy
(@tammy)
Member Moderator

It won't work

striptags only works with HTML tags.

ReplyQuote
Posted : 08/04/2009 6:15 pm
Azurite
(@azurite)
Estimable Member

That's what I find totally weird. I didn't EXPECT it to work, since the special character num/long-form codes aren't really HTML, but they ended up getting converted in the HTML Allowable Tags box anyway, and then the chapter where they were appearing as crazy r30; and such codes seemed to look fine to me! But if it's only something visible with a chapter initially when it's uploaded or something, maybe I have nothing to worry about? I don't know, a huge majority of fics on my site use these characters, so is there any way to ensure that they'll always be left intact?

Archive: Dragonfayth
eFiction: 3.5.5
Latest Patch(es): Yes
bridged?: No
modified?: Yes
PHP: 5.3.27
MySQL: 5.5.42-cll

ReplyQuote
Topic starter Posted : 08/04/2009 11:17 pm
Jan_AQ
(@jan_aq)
Noble Member

Please check and see if this is an issue still with 3.5.1. Thank you.

Whoever said nothing is impossible never tried slamming a revolving door.

ReplyQuote
Posted : 25/04/2009 4:21 am
Tammy
(@tammy)
Member Moderator

How are you sending these special characters?  As HTML entities?  Or are you just cutting and pasting?  If the later it's probably a mismatch in the charset between what you're sending and what the database is storing. 

ReplyQuote
Posted : 20/06/2009 7:08 am
Azurite
(@azurite)
Estimable Member

Okay, so I checked before I updated my files with the latest SVN release, and after, and both times, the r-character issue doesn't appear to be happening again. That could be because I inputted those special HTML characters in the "Allowed Tags" field, or because at some point I did an internal find-replace that worked, but I'm not sure which (if either). Also, I was of the understanding that only bracketed HTML tags would work in the Allowed Tags field, not characters like

é

, which is how I was "sending" the characters, both in my text and in the Allowed Tags field. The actual text converts the characters properly, but when displaying what tags are allowed, it shows the code, rather than the resulting symbol.

For example, when I (an admin, and the owner of my story) go to modify my chapter, I see this:

Note: Allowed HTML tags are: <strong> <br> <em> <br /> <blockquote> <strike> <b> <i> <u> <center> <img> <a> <hr> <p> <ul> <li> <ol>&#151;&#8230;&#233;

I thought I had TinyMCE on and working (it displayed when I went to add a new News Item), so the tiny MCE box is checked, but I don't actually see any of the TinyMCE tools. I do see my story in HTML mode, but the special characters appear "normal" --that is, NOT in code.

I'm wondering if maybe this problem relates to the disappearing act my TinyMCE keeps trying to pull? I've tried updating it, checking my header.php file, double-checking that all the files in place...why would it show up for one part of the site but not another? Could it even be behind this weird processing of special characters?

Archive: Dragonfayth
eFiction: 3.5.5
Latest Patch(es): Yes
bridged?: No
modified?: Yes
PHP: 5.3.27
MySQL: 5.5.42-cll

ReplyQuote
Topic starter Posted : 28/06/2009 9:25 pm
Tammy
(@tammy)
Member Moderator

It probably is tinyMCE.  tinyMCE does it's own cleanup of submitted code before sending.  I think you'll need a custom tinyMCE cofig that allows raw encoding.  Check the tinyMCE site.  Do it VERY carefully though as that's one way you can get hacked.

ReplyQuote
Posted : 08/07/2009 2:22 am
Jan_AQ
(@jan_aq)
Noble Member

Any updates on this issue? 🙂

Whoever said nothing is impossible never tried slamming a revolving door.

ReplyQuote
Posted : 24/11/2009 1:18 am
Jan_AQ
(@jan_aq)
Noble Member

Someone please update as to whether or not this has been fixed (newest SVN files) by testing on their archive. Thank you!

Whoever said nothing is impossible never tried slamming a revolving door.

ReplyQuote
Posted : 04/10/2010 9:44 am
Share: