Move the HTML-escaping JavaScript code to a separate function

We might need to use it in more than one place, and it will be easier
to remember about escaping if we have an utility function for that.

Change-Id: I408a1ce055bb2f07b3c146dfa6eb5122fd5434d8
Merge "Move the HTML-escaping JavaScript code to a separate function"
User signup/signin in newly designed jio-dashboard

Port to master the new user signup, change password, phone number, email
addressed in below blueprints in havana_jio_dashboard branch:
https://blueprints.launchpad.net/jio/+spec/user-registration
https://blueprints.launchpad.net/jio/+spec/change-password
https://blueprints.launchpad.net/jio/+spec/change-phone-number
https://blueprints.launchpad.net/jio/+spec/change-email

P.S.
* The change-* functionalities were implemented using customization modules
in havana_jio_dashboard w.r.t the below URL:
http://docs.openstack.org/developer/horizon/topics/customizing.html
Now, they are implemented as plugins w.r.t the below upstream blueprint
https://blueprints.launchpad.net/horizon/+spec/plugin-panel-config

* User registration feature related URLs loading is slightly modified to avoid
modifications to openstack_dashboard.urls.py file. Instead, a new file
horizon_jiocloud/root_urls.py is added. So, for those urls to work,
add below entry in local_settings.py file
ROOT_URLCONF='horizon_jiocloud.root_urls'

The intention is to avoid as much changes as possible to core files in master
so that rebasing with upstream master is less painful.

Implements: blueprint icehouse-based-jiodashboard
Implements: blueprint user-signup-signin-new-jio-dashboard
User signup/signin in newly designed jio-dashboard

Follow up to commit c43647fc1c5961e374c034a7392f3e592b335f0a
Addressed code review feedback:
* Removed debug statements in horizon_jiocloud/root_urls.py
* Removed swap file horizon_jiocloud/README.rst~
User signup/signin in newly designed jio-dashboard

Follow up to commit c43647fc1c5961e374c034a7392f3e592b335f0a
Port the fix for below bug to master
https://bugs.launchpad.net/jio/+bug/1324475

The code from havana_jio_dashboard is refactored
to be easily rebase-able with upstream master

Implements: blueprint user-signup-signin-new-jio-dashboard