Thursday, 5 April 2018

How to know my website is hacked or not ?



How to know my website is hacked or not ?

Hello friends, Some time we feel that our website is hacked. But we are not sure about this so today i will show you how to know my website is hacked or not. you can check your website status using Google Safe Browsing service.  
Google provide safe browsing service that Google security team built to identify unsafe website across the web and notify users and webmaster of potential harm. Using their service you can chaek you website is hacked or in your website their is unwanted code/data or not.

For checking website hake status hit below URL in you browser:

Ex:  http://www.google.com/safebrowsing/diagnostic?site=www.xyz.com


Else hit below url in browser


Enter your domain name in search box and click on search icon

After couple of seconds it show your results. If your website has been hacked, it should show a warning here. If this doesn't show an error, it's possible your website has still been compromised. When Google detect unsafe sites, Google show warnings on Google Search and in web browsers. You can search to see whether a website is currently dangerous to visit. For more about Google Safe Browsing click here to read 

You can also integrate Google Safe Browsing in your website. For more information about Google Safe Browsing for Developers, Click here 


You can find Google Safe Browsing API’s Integration tutorial here 

So i hope you can get you website current information.
Feel free to comment and don't forget to like.



Tuesday, 3 April 2018

Why CKEditor automatically remove html elements, attributes, styles and classes ?




Why CKEditor automatically remove html elements, attributes, styles and classes ?

Hello friends, today i tell you why CKEditor automatically remove html elements, attributes, styles and classes and how to solve it.
source

Whenever you want to change the code using source button for how it is fit in design view, you face that your all elements, attributes, styles and classes are removed automatically which is you add before. This is caused by Advance Content Filter. Advance Content Filter (ACF) is a core feature of CKEditor that filters incoming HTML contnet by transforming and deleting disallowed elements, attributes, classes and styles. If you paste content into CKEditor and notice that some elements are removed, then chances are high that it was removed by ACF.

By default, ACF works in automatic mode. It means that out-of-the-box CKEditor will only allow content that was defined as allowed by enabled editor features (buttons, plugins).

For more information you can visit  Advance Content Filter.
Now i will show you how to dissable Advance Content Filter in CKEditor.
For disallow ACF in ckeditor open config.js file. You can find config.js in ckeditor root folder. Open config.js in any your favourite text editor.
After opened it you can see CKEDITOR.editorConfig function and some bounch or code it written here.

For dissable Advance Content Filter you write following code in cofing.js

        config.allowedContent = true;

You can write this code inside CKEDITOR.editorConfig function and outside CKEDITOR.editorConfig function both. I read some blogs on internet and get that write this code in inside editorConfig functin but still my issues is not solve but after wtite this code inside and outside editorConfig function it will work fine for me.

After write this code save config.js file and refresh you CKEditor page.
Your issue is solved and it will work fine.

You can find some more information for allow and disallowed content

Disallow inline styles
        // Disallow setting borders for images. '*' is used as a 
           wildcard.
        
           config.disallowedContent = 'img{border*};
Disallow attributes
        // Disallow setting a target for links.

           config.disallowedContent = 'a[target]';

Disallow inline styles and use attributes instead
        // In case of disallowing width and height styles, CKEditor 
           will use attributes instead.
        
          config.disallowedContent = 'img{width,height}';

Specify all allowed tags manually

        // Example: Allow <u>, <em>, <strong>, <ul>, <li>, <a>.
        // For <a> elements, "href" attribute is required and 
          "target" is optional.
        
          config.allowedContent = 'u em strong ul li;a[!href,target]';


I hope i solved your query. Feel fre to comment and don't forget to like.