tagged [escaping]

Adding quotes to a string in VBScript

Adding quotes to a string in VBScript I have this code: After running it, the value of `g` is `abcd xyz`. However, I want quotes around the value of `a` in `g`. After running the code, `g` should be `...

How to use double quotes in a string when using the @ symbol?

How to use double quotes in a string when using the @ symbol? I need to use double quotes in a string that uses the @ symbol. Using double quotes is breaking the string. I tried escaping with \, but t...

4 Sep at 00:14

How to escape a JSON string containing newline characters using JavaScript?

How to escape a JSON string containing newline characters using JavaScript? I have to form a JSON string in which a value is having new line character. This has to be escaped and then posted using AJA...

23 Jul at 15:12

Javascript - How to show escape characters in a string?

Javascript - How to show escape characters in a string? Very simple question, but for some reason I can't find the answer anywhere after 10 minutes of Googling. How can I show escape characters when p...

10 Feb at 08:38

How to use "\" in a string without making it an escape sequence - C#?

How to use "\" in a string without making it an escape sequence - C#? I'm sure this is something really basic that I don't know but how do I make it not recognize "\" as an escape sequence inside a st...

20 Nov at 02:53

Escape double quote character in XML

Escape double quote character in XML Is there an escape character for a double quote in xml? I want to write a tag like: but if I put ", then that means string has ended. I need something like this (c...

9 Mar at 19:7

How to do a verbatim string literal in VB.NET?

How to do a verbatim string literal in VB.NET? How do you do a string literal in VB.NET? This is achieved in C# as follows: This means that the backslashes are treated literally and not as escape char...

How to put unprocessed (escaped) words inside String.Format

How to put unprocessed (escaped) words inside String.Format I am formatting a date: I want to put the word "at" after the "d", but I don't want the string to format it. I just want the word "at". How ...

What is the recommended way to escape HTML symbols in plain Java?

What is the recommended way to escape HTML symbols in plain Java? Is there a recommended way to escape ``, `"` and `&` characters when outputting HTML in plain Java code? (Other than manually doing th...

3 Mar at 16:48

Unescape an escaped url in c#

Unescape an escaped url in c# I have urls which is escaped in this form: I want to convert it to unescaped form is this the same thing as escapped html? how do i do this? thanks

12 Jul at 15:31

Escape @ character in razor view engine

Escape @ character in razor view engine I am creating a sample ASP.NET MVC 3 site using Razor as view engine. The razor syntax starts with `@` character e.g. `@RenderBody()`. If I write @test on my cs...

7 Nov at 06:47

String literals and escape characters in postgresql

String literals and escape characters in postgresql Attempting to insert an escape character into a table results in a warning. For example: Produces the warning: () Anyone know how

2 Jan at 22:34

Can I escape a double quote in a verbatim string literal?

Can I escape a double quote in a verbatim string literal? In a verbatim string literal (@"foo") in C#, backslashes aren't treated as escapes, so doing \" to get a double quote doesn't work. Is there a...

Command to escape a string in bash

Command to escape a string in bash I need a bash command that will convert a string to something that is escaped. Here's an example: Where the escape command makes `"hello\world"` into `"hello\\\world...

16 May at 23:44

How to decode Unicode escape sequences like "\u00ed" to proper UTF-8 encoded characters?

How to decode Unicode escape sequences like "\u00ed" to proper UTF-8 encoded characters? Is there a function in PHP that can decode Unicode escape sequences like "`\u00ed`" to "`í`" and all other simi...

23 May at 12:2

Can I convert a C# string value to an escaped string literal?

Can I convert a C# string value to an escaped string literal? In C#, can I convert a string value to a string literal, the way I would see it in code? I would like to replace tabs, newlines, etc. with...

19 Jun at 16:21

How to escape double quotes in a title attribute

How to escape double quotes in a title attribute I am trying to use a string that contains double quotes in the title attribute of an anchor. So far I tried these: and Please note that using

11 Aug at 19:4

PHP regex to remove multiple ?-marks

PHP regex to remove multiple ?-marks I'm having trouble coming up with the correct regex string to remove a sequence of multiple ? characters. I want to replace more than one sequential ? with a singl...

25 Sep at 22:38

C# - What does "\0" equate to?

C# - What does "\0" equate to? I am playing with [Pex](http://research.microsoft.com/en-us/projects/Pex/) and one of the parameters it passes into my method is `"\0"`. What does that mean? My guess is...

18 Feb at 22:53

How to escape special characters of a string with single backslashes

How to escape special characters of a string with single backslashes I'm trying to escape the characters `-]\^$*.` each with a single backslash `\`. For example the string: `^stack.*/overflo\w$arr=1` ...

7 Aug at 11:33

Do I need to escape backslash in a config file?

Do I need to escape backslash in a config file? I have a config file, myapp.exe.config. In the file I have an attribute with a fullpath filename as the value. It seems to work if I use a single or dou...

Escaping HTML strings with jQuery

Escaping HTML strings with jQuery Does anyone know of an easy way to escape HTML from strings in [jQuery](http://jquery.com/)? I need to be able to pass an arbitrary string and have it properly escape...

1 May at 10:47

How to HTML encode/escape a string? Is there a built-in?

How to HTML encode/escape a string? Is there a built-in? I have an untrusted string that I want to show as text in an HTML page. I need to escape the chars '`

Valid JSON giving JSONDecodeError: Expecting , delimiter

Valid JSON giving JSONDecodeError: Expecting , delimiter I'm trying to parse a json response data from youtube api but i keep getting an error. Here is the snippet where it choking: ..and this happens...

3 Jan at 15:34

How to get a char from an ASCII Character Code in C#

How to get a char from an ASCII Character Code in C# I'm trying to parse a file in C# that has field (string) arrays separated by ASCII character codes 0, 1 and 2 (in Visual Basic 6 you can generate t...

23 Mar at 00:24