Inline Disabling of Firefox Spellcheck? - firefox

I researched this a while ago and can't remember how to do it. I want to be able to prevent Firefox from running it's spell-checking functionality on certain input fields from within the page. I know it's possible but can't remember how to set it up.

Talk about having a big "duh" moment! I found the answer after some trial & error:
<textarea spellcheck="false"></textarea>

The "spellcheck" attribute is currently an extra feature available only in Firefox, but it is being considered for inclusion in HTML5.

add the attribute using JQuery $('.textarea_className').attr('spellcheck',false);
This will allow you to return a valid XHTML mark up. =)

The downside of this is that the W3 strict validator gives - Attribute "spellcheck" is not a valid attribute. Bad news for those of us with OCD that love to see 0 errors in validating our sites.

Related

Does the Pinterest validator work?

I'm trying to embed rich pins to our website. I used Schema.org for Product. While Google validates correctly the page, when I m trying the Pinterest validator I'm always getting the following error:
The data we scraped from your site could not be validated. Please make sure all required tags are present and you aren't serving different pages depending on different user agents.
Anybody had the same experience and somehow managed to solve this?
For me the answer was quite simply to use "http://www.example.com" instead of "http://example.com"
That was it. Didn't need to change anything else.
So I notice you're also using:
https://sealsmile.com/products/search?keyphrase=smart&category=&resultType=product
try using:
https://www.sealsmile.com/products/search?keyphrase=smart&category=&resultType=product

Remove extra </div> tags from in front of </body> tag? (Google dynamic remarketing api)

I'm trying to enable dynamic remarketing tags, Fooman dynamic remarketing is installed. Google's Tag assistant reports that the script should be immediately before the closing tag, the Google api seems to add twice after
The data is all good, it's simply not working because of these extra s from what I can see. How can I locate and remove these? I've done some investigation in the relevant files but can't find anything likely to cause the problem.
The issue may be part of the Google api, if I disable this then the additional tags disappear.
My other option is to manually add the remarketing snippet, I've tried this through Design -> Footer -> Miscellaneous html, whilst this is correctly placed before the and has no extra tags the dynamic data fields are not populated. Am I missing something? Is it being treated as flat html rather than dynamic?
Magento 1.9.0
Hoping someone can help.
Thanks
Rob
Want to try this one? Also regarding script should be immediately before the closing tag, this is not a big issue. http://ecommppc.com/2014/09/05/setting-up-dynamic-remarketing-on-your-magento-webstore-using-google-tag-manager/

Learning Yii: checking with ajax won't work

I have a small problem that seems to be big enough to hold me from my work.
As I said in the title, I am leaning Yii and after I developped my project, I realized that I don't have ajax check.
I tried to solve this by setting enableAjaxValidation to true and it didn't worked. I tried to make use of the method performAjaxValidation and, again, it didn't worked. The third way was to copy the content of performAjaxValidation and paste it inside my method (like in documentation and identical with the code generated by Yii.
I checked my js and they are loaded.
What could it be? How can I solve this? The problem is that I need my fields to modify while the user is completing the form.
Thank you!
PS: I checked some topics from stackoverflow but the only one who was related was Yii - Ajax Form with validations
Make sure the from that is being validated has the same ID that is being used in the performAjaxValidation function. For example if your form has the id product-form, the if statement should look like this:if(isset($_POST['ajax']) && $_POST['ajax']==='product-form')
If possible I recommend using Firefox with firebug extension so that you can debug whether the AJAX call is even being made, and what is being returned.

Facebook Like Button Comments Not Working - https issue

I'm using FBML and everything was working before, then I noticed that when you click like the comment box would not show up anymore. I checked out the dev site and saw that the way it's done now has changed.
I updated my code but it still doesn't show the comments box but the actual liking action works fine.
Here is a link: http://fez.nu/Oniir
EDIT 2: I'm using XFBML, I don't know if that makes a difference. I've heard that FBML is deprecated
EDIT 3: I browse with https on Facebook. I turned it off and the comment boxes show up on my site. So that problem is solved but how do I make it work with users that are using secure browsing on Facebook when my site is not?
You can use an HTML inline frame.
<iframe src="https://mytab.example.com/tabs/"></iframe>
This question has produced an accepted solution to what appears to be your problem.
Abstract
You can avoid SSL warnings for domains that support SSL by not being
specific about the transport protocol. e.g. instead of including
http:// or https:// use //
<!-- Instead of this: -->
<iframe src="http://www.facebook.com/plugins/like.php?params"></iframe>
<!-- Do this: -->
<iframe src="//www.facebook.com/plugins/like.php?params"></iframe>
Security considerations
Please note that there are some security considerations to this approach. I recommend you read the below articles and questions.
Are there security issues with embedding an https iframe on an http page (SE question)
HTTP and HTTPS iframe (SO question)
Other considerations when serving mixed (http/https) content (external site)
Edit 1
In the FAQ for the Like Button, it's stated that it will need 400 pixels in width to give the user the option to add a comment. If you don't have 400 pixels available, I think you would have to sacrifice the option to post a comment, or use a popup-window instead.
This problem started last night.
I thought it was my code at first but a quick rollback to code I KNOW (QA Tested) worked manifested the issue.
I went to the source itself, Facebook's OWN Like button generation tool and THEY have the same problem.
Then I picked BOTH a random CNN & Yahoo news article and that is what you call a trifecta. All 3 sites could not properly render the comments UI elements for the like button.
If it walks, quacks and moves its head like a duck... WTF? :))

HTML codes showing in viewpage HTML data

I’m a new to Codeigniter. Just using it in my project from last 2 months. I’ve a comment section in my project. Where any one can give comments. Every things are going perfect but when ever any one putting HTML content(image/videos) & then when those are showing back in the comment section… direct HTML codes are showing in the comment page rather than HTML content(image/videos).
ex: when i’m saving any “embed youtube video code” in the comment box & save that the out put comes as “raw Embed Video codes” rather than Youtube Video…..
I feel like it must be a minor thing but really can’t understand where the fault has occurring. Plz, if any body have the solution reply me back as soon as possible.
Couldn't one devise a system where somebody just posts the youtube link itself and through a combination of regular expressions your own system generates the object/embed code itself so there's no security risk possible?
I had a similar problem a while back - wanting to give end users the ability to post YouTube videos, but not allow them to just post anything without some sort of XSS protection.
I ended up using htmlpurifier - http://htmlpurifier.org/ to filter the contents being submitted in the form.
There is a modification that can be made to the whitelist that allows YouTube code through the purifier.
http://htmlpurifier.org/docs/enduser-youtube.html
So far, that's working well, but my system is still in development.
As a quick hack you can do htmlspecialchars_decode when displaying the comment in your view. This is very dangerous though without the use of sanitization when you receive the comment - search xss_clean on this page. You should also use strip_tags to remove all the HTML tags you don't need (everything except the video tags) prior to inserting the comment in the database.

Resources