how to allow to type gujarati language in input box in angular 2.? - md2

I am using md2 library for my text-box. I want that input box allow me to type data in Gujarati language.I google it for this requirement but find no page for this requirement. Any help is very thankfull for me.

https://scotch.io/tutorials/simple-language-translation-in-angular-2-part-1
try this! If i does not work post i in the comments section!

Related

django - ckeditor bug renders text/string in raw html format

am using django ckeditor. Any text/content entered into its editor renders raw html output on the webpage.
for ex: this is rendered output of ckeditor field (RichTextField) on a webpage;
<p><span style="color:rgb(0, 0, 0)">this is a test file ’s forces durin</span><span style="color:rgb(0, 0, 0)">galla’s good test is one that fails Thereafter, never to fail in real environment. </span></p>
I have been looking for a solution for a long time now but unable to find one :( There are some questions which are similar but none of those have been able to help. It will be helpful if any changes suggested are provided with the exact location where it needs to be changed. Needless to say I am a newbie.
Thanks
You need to mark the relevant variable that contains the html snippet in your template as safe
Obviously you should be sure, that the text comes from trusted users and is safe, because with the safe filter you are disabling a security feature (autoescaping) that Django applies per default.
If your ckeditor is part of a comment form and your mark the entered text as safe, anybody with access to the form could inject Javascipt and other (potentially nasty) stuff in your page.
The whole story is explained pretty well in the official docs: https://docs.djangoproject.com/en/dev/topics/templates/#automatic-html-escaping

Select all frames at once in Selenium

This could be a stupid questions for some. But its truly important for me.
I know how to switch frames using selenium webdriver.
However, is there a way to download all the page_source of the entire page for all the frames at once.
Instead of switching them again and again?
Could someone please let me know the command if it exists?
If not then please say there is none. And that should answer my question.
Thanks in advance
Webdrivers' getPageSource will return some state in some formatting of the last page the driver was on.
From the (java)docs, but most probably applies to other languages:
getPageSource
java.lang.String getPageSource()
Get the source of the last loaded page. If the page has been modified
after loading (for example, by Javascript) there is no guarantee that
the returned text is that of the modified page. Please consult the
documentation of the particular driver being used to determine whether
the returned text reflects the current state of the page or the text
last sent by the web server. The page source returned is a
representation of the underlying DOM: do not expect it to be formatted
or escaped in the same way as the response sent from the web server.
Think of it as an artist's impression.
Returns:
The source of the current page
http://selenium.googlecode.com/git/docs/api/java/org/openqa/selenium/WebDriver.html#getPageSource%28%29

Is it possible to edit tag of a file programatically using c++

I want to add/edit the tag of a file programatically using c++.But after seraching for almost 2 days I found nothing.Could you kindly help me whether we can add/edit the tag of a file using c++?
Thanks in advance.
Edit 1:
I want to edit the OS level tag on file/directory.Eg:Each file has its own properties like Title,Subject,Categories and one among this is tags.I want to edit/add the property "Tags".
Thanks tony for suggestion.
Regards,
Ravi
Here's a detailed example about how to access the property values of a file:
http://support.microsoft.com/kb/186898
Here's a shorter example that shows how to write property values:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa380387(v=vs.85).aspx
I don't know about the property Tags (I haven't seen it anywhere), but as you see, it basically is possible to manipulate properties of NTFS files.

Give user customization choice

I've seen that this site allows users to customize their questions through some marks (headers with **. Underlined..... Bold...)
So how to do this .
Here is what I know: html- php-javascript-ruby:
Is it possible to obtain this with my knowledge
There are open source javascript markdown processors. like this one or that one

How do I encode html leaving out the safe html

My data coming from the database might contain some html. If I use
string dataFromDb = "Some text<br />some more <br><ul><li>item 1</li></ul>";
HttpContext.Current.Server.HtmlEncode(dateFromDb);
Then everything gets encoded and I see the safe Html on the screen.
However, I want to be able to execute the safe html as noted in the dataFromDb above.
I think I am trying to create white list to check against.
How do I go about doing this?
Is there some Regex already out there that can do this?
Check out this article the AntiXSS library is also worth a look
You should use the Microsoft AntiXSS library. I believe the latest version is available here. Specifically, you'll want to use the GetSafeHtmlFragment method.