Otherwise Occupied
 


Navigation


Syndicate
Syndicate content


User login


 

Drupal, MarsEdit, and #039 (Updated)

gregh  2005-11-16 21:43       

I've been slow posting to the old blog of late, not in any small part to the switch to Drupal, which made life with MarsEdit... uncomfortable. Every time I posted and it resynced, all of the posts had their apostrophes translated to #039. When MarsEdit got this (and from what I've read, ecto, as well), it slapped it into the text as #039. If I edited and resubmitted, bang. #039 in the text. If I edited a post (which I do, sometimes repeatedly, as I fix them), I'd have to clear out all of those #039's.

Obviously, one workaround would have been to use no apostrophes in my writing. My workaround was to just use the web submission of blog entries, which I always found to be annoying. Can't do it working offline. No spell-checking. Generally, a pain.

What was the problem? In xmlrpc.inc, xmlrpc_value_get_xml() called Drupal's check_plain(), which in turn called the PHP builtin htmlspecialchars(). However, the Drupal check_plain() called with ENT_QUOTES translated all single quotes... to #039.

I replaced xmlrpc_value_get_xml()'s call to check_plain() with a call to htmlspecialchars() without ENT_QUOTES.

Problem solved. I imagine there must be a larger problem somewhere else, maybe in some shared library used by both MarsEdit and ecto? If I was more proactive, I'd log a bug with each (as was requested by ecto's author, the last time I mentioned my gripes.) But I'm, uh, otherwise occupied.

Update (18 November):
After having figured out the problem, I returned today to Drupal's search and searched for "ENT_QUOTES". And I found that for upcoming versions, it would appear my change is already in place.

wontfix
Richard (not verified)  2005-11-18 17:43   

Actually, it's been set to 'wontfix', so it's not in the latest version, as far as I can tell. Check the CVS version of common.inc to verify: http://cvs.drupal.org/viewcvs/drupal/drupal/includes/common.inc


Sure enough!
gregh  2005-11-18 18:54   

I didn't look carefully enough. I've not really familiarized myself with the Drupal development process yet, clearly.

That's unfortunate. I guess I'll keep my fix in place, until it interferes with my needs.


Post new comment

The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.
  • You can use Textile markup to format text between the [textile] and (optional) [/textile] tags.
More information about formatting options
 
Browse archives
« November 2008  
Su Mo Tu We Th Fr Sa
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 21 22
23 24 25 26 27 28 29
30            










Akismet spam counter
Proudly protected by Akismet, 2193 spam caught since October 20, 2006