I'm using TinyMCE for richtext editing in a webmail client. Suddenly, after years and years of begging us to build something like this, customers are able to paste images directly from the clipboard in tiny. While I always try to achieve to be as smart as Google, I immediately logged in to my Gmail account and started pasting away.. Yep, paste also worked in Gmail and, yep, images were also broken in the sent e-mail.
Here is a shortened part of the html, as generated by firefox after pasting my screenshot into the textarea:
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABDgAAA<andsoonfor100k>"/>
I have to say, I'm very excited about this new feature, but I cannot seem to find anything (literally!) about this topic, so any suggestions about when this was added to firefox, or even how to make this actually work in e-mail clients will be really appreciated!
This is a bit old, but this was added to Firefox since version 4, and Thunderbird (sort-of) since version 6 (it seems it could read them since version 3).
In the case of Thunderbird, even if Thunderbird support Data URIs, other email clients may not, so Thunderbird convert them to classic MIME attachments (with CIDs as URL).
In the case of GMail, as of today (march 2013), pasted image data is included as data URIs, while drag-and-droped images (at least in Linux, with Gnome, from Nautilus to Firefox) include them as common MIME attachments. So, if you send an email with a data URI image, some email clients will display it correctly, some will not. (Ironic thing, Gmail cannot display them, at least not with Firefox and Chrome).
BTW, in Thunderbird at least, as the data URI don't have full information about the image, if you try to save it you need to provide the name or use the "image.jpeg" generic name.
Information about Data URIs:
https://www.rfc-editor.org/rfc/rfc2397
http://en.wikipedia.org/wiki/Data_URI_scheme
Information about how to remove or convert Data URIs from pasted data in CKEditor (some people don't like them for some [valid] reasons):
http://ckeditor.com/forums/Plugins/ImagePaste-plugin-for-Firefox
http://dev.ckeditor.com/ticket/8208
So, there is much information, maybe just searching for "data uri" would return more results.
Related
I've been trying to solve this issue for a week now, and so far not so good.
An XPages application mimics an email client, with a <xp:inputRichText> connected to a RichText field in a Form. Nothing out of the ordinary.
When an image file gets embedded via the Insert Image button on CKEditor, and the filename has non-ASCII characters, the resulting MIME bodies register discrepant names, breaking the mail.
In this case, the original filename was atenção.jpg, but names get messy on Body field.
I sincerely appreciate any advice
I did a few tests and I see inconsistencies even in v12. Strangely, the Notes client seems to be able to open such emails. (I tried external email on v9.0.1 and Outlook could not display the image).
As Per suggested, you should open a support case with HCL. They have implemented some fixes in this area recently for 12.0.2.
I'm struggling to figure out how to defeat this process on Hotmail.com.
When I send an e-mail using a PHP script (and PHPMailer libraries, using Sendmail), recipient viewing the message from Hotmail.com gets a very bare message. Images are there, but all of the HTML formatting (styles, attributes, hyperlinks) is stripped away. Not even the <td> attributes remain (such as colspan, cellpadding, etc).
However, when I send the exact same message directly from a regular mail client (or webmail interface), all formatting and styling is preserved intact.
My PHP script sends a customised HTML message to a group of recipients, but it does it one by one (customising parts of the message for each recipient).
It appears that Hotmail doesn't seem to trust my server with the messages and is removing attributes and links as a security precaution. However, there is no way for receiving user to override this. Adding the sender to the whitelist does nothing. I have posted this on a Microsoft forum, without much success. I'm hoping someone here might have fought with the same problem and found a solution, or at least work-around.
I tried various things. I put a time delay of a few seconds between sending of two messages, thinking that Hotmail doesn't like mass mailing, and if two or more messages arrive from same sender at the same time, it will activate this blocking. It didn't help. I tried using SMTP script, sending the message through g-mail's SMTP server. Same problem -- stripped-out formatting.
[update]: I have even tried using Microsoft's own SMTP servers for hotmail, using a valid outlook.com user account to send (from that PHPMailer script). When viewed through hotmail.com web interface, the message is still stripped of all formatting and links.
Meanwhile, when these problem messages are viewed through a mail client (iOS, OSX, Windows, Android, MS Outlook), all is perfectly fine. [/update]
Right now, my work-around is pasting a long URL for this one important link that I want users to use, for recipients who have 'hotmail' or 'outlook' or 'live' in their e-mail address.
Any creative thoughts?
[update 2]After a lot of tinkering, I was able to re-format the message so that at least some of the formatting is preserved, so now, I got <table> tags to work. What's weird is, <bgcolor> also works, but <center> doesn't, nor do any css style attributes (neither to <tr>, nor to <td> or <table> itself). Fortunately, I now have <a href> tags working properly, so the links are functional again. I have basically given up on the whole thing and have developed a separate bare-bones template only for hotmail/outlook recipients.
Frustrating![/update 2]
I'm not sure this is still an issue for you but since I didn't find ANY resources around that matter I thought it was useful to post it here.
I had the same problem and I figured it was that my links were dummies (only href="#") and that outlook stripped them (whereas gmail rewrites the href).
Apparently if there isn't a valid href tag, it strips the link, even if it's been used just for cosmetic.
I would advice not to use them for anything else than links (obviously).
Hope it'll help.
I'm trying to send a nicely formatted email with an icalendar to a user who's using outlook 2010, but the result is horrible. If the file is removed everything looks great.
I thought I was doing something wrong, so I've tried the same scenario using Google's calendar and got the same result.
In following image, on the right side you can see how google's html is all messed up when it arrives from server.
on the left side, i've saved the email as eml changed the invitation mime-type to something else and the email is fixed:
You may find the sample two EML files here on github:
original_mail
fixed_mail_invite_not_working
As you'll see, the only difference is the calendar mime in line 172.
Does any one have any ideas why is this happening? is there a workaround?? or a fix?
Update: one of our clients sent me a screen-shot of his outlook, in this case you may see that outlook displays the html better and also process the event... any ideas?
Thanks,
Roey
Outlook internally uses RTF for the appointments, tasks and contacts, so your HTML will always be (imperfectly) converted to RTF.
There isn't much you can do besides tweaking your HTML until Outlook likes it.
We are grabbing our feed at feedburner by using the jquery jGFeed plugin.
this works great until the moment our users are on a httpS:// page.
When we try to load the feed on that page the user gets the message that there is mixed conteent, protected and unprotected on the page.
A solution would be to load the feed on https, but google doesn't allow that, the certificate isn't working.
$.jGFeed('httpS://feeds.feedburner.com/xxx')
Does anyone know a workaround for this. The way it functions now, we simply cannot server the feed in our pages when on httpS
At this time Feedburner does not offer feeds over SSL (https scheme). The message that you're getting regarding mixed content is by design; in fact, any and all content that is not being loaded from a secured connection will trigger that message, so making sure that all content is loaded over SSL is really your only alternative to avoid that popup.
As I mentioned, Feedburner doesn't offer feeds over SSL, so realistically you'll need to look into porting your feed to another service that DOES offer feeds over SSL. Keep in mind what I said above, however, with respect to your feed's content as well. If you have any embedded content that is not delivered via SSL then that content will also trigger the popup that you're trying to avoid.
This comes up from time to time with other services that don't have an SSL cert (Twitter's API is a bit of a mess that way too.) Brian's comment is correct about the nature of the message, so you've got a few options:
If this is on your server, and the core data is on your server too, then you've got end to end SSL capabilities; just point jGFeed to the local RSS feed that FeedBurner's already importing.
Code up a proxy on your server to marshall the call to Feedburner and return the response over SSL.
Find another feed service that supports SSL, and either pass it the original feed or the Feedburner one.
i have started using WordPress paid theme Schema for my several blogs. In general, it is a nice theme, fast and SEO friendly. However, since my blogs are all on HTTPS, then I noticed that if I had a widget of (Google Feedburner) in the sitebar. The chrome will show a security error for any secure page with an insecure form call on the page.
To fix this, it is really simple,
you would just need to change the file widget-subscribe.php located at /wp-content/themes/schema/functions/ and replace all “http://feedburner.google.com” to “https://feedburner.google.com”.
Save the file, and clear the cache, then your browser will show a green padlock.
and i fix this in my this blog www.androidloud.com
We have members-only paid content that is frequently copied and republished without our permission.
We are trying to ‘watermark’ our content by including each customer’s user id in a fake css class, for example <p class='userid_1234'> (except not so obivous, of course :), that would help us track the source of the copying, and then we place that class somewhere in the article body.
The problem is, by including user-specific information into an article, it makes it so that the article content is ineligible for caching because it is now unique to each user.
This bumps the page load time from ~.8ms to ~2.5sec for each article page view.
Does anyone know of any watermarking strategies that can still be used with caching?
Alternatively, what can be done to speed up database access? ( ha, ha, that there’s just a tiny topic i’m sure.. )
We're using the CMS Expression Engine, but I'd like to hear about any strategies. They don't have to be EE-specific.
If you're talking about images then you could use PHP to add a watermark to the images.
How can I add an image onto an image in PHP like a watermark
its a tool to help track down the lazy copiers who just copy the source code as-is. this is not preventative, nor is it a deterrent. – Ian 12 hours ago
Going by your above comment you are happy with users copying your content, just not without the formatting etc. So what you could do is provide the users an embed type of source code for that particular content just like YouTube does with videos. Into that embed source code you could add your own links back to your site, utilize your own CSS etc.
That way you can still allow the members to use the content but it will always come out the way you intended it with links back to your site.
Thanks
You could always cache a version that uses a special string, like #!username!#, and then later fill it in with PHP based on which user is viewing it.
Another way I believe is to switch from caching on the server to instead let the browser cache it locally for a little. That way it is only cached per user, and it reduces the calls to your database. Because an article is pretty static, you could just let the local computer cache it, and pull in comments via javascript.
This last one is probably not one you are really looking for, but I'm gonna come out and say it anyway. You could not treat your users like thieves, and instead treat the thieves as thieves. Go to the person hosting the servers your content is on and send them an email telling them copyrighted premium content is being hosted on their servers without your permission. You can even automate that process.
How to find out what sites are posting your content? Put a link in the body content to your site, and do a Google Search/Blog Search for articles linking to that site. To automate it, use Google Blog Search because it offers RSS feeds. Any one that has a link back to your site could go into a database with a link to the page, someone could look at it, and if it is the entire article, go do a Whois and send them an email.
What makes you think adding css to something is going to stop people from copying it without that CSS? It's more likely that they are just coping the source of the content you are showing them and ignoring all the styling around it. For example, I use tamper data to look at all HTTP requests made by Firefox, if I can see it on the page, I can see it in the logs. Even with all the "protection" some sites try to put in place, they generally will never work. I can grab what I want, without using any screen capture/recording.
If you were serving flv's, for example, I would easily be able to grab the source of that even if you overlayed it with some CSS. I think the best approach would be to get the sites publishing your premium content and ask them to remove it. It's either that or watermark the actual content on the fly while sending it to the browser.