escape (2,372)


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: create table EscapeTest(text varchar(50)); insert into EscapeTest(text) values('This is the first part \n And t…


Triple Quotes? How do I delimit a databound Javascript string parameter in ASP.NET?

How do I delimit a Javascript databound string parameter in an anchor OnClick event? I have an anchor tag in an ASP.NET Repeater control. The OnClick event of the anchor contains a call to a Javas…


mysql - What do I need to escape when sending a query?

When you execute a SQL query, you have to clean your strings or users can execute malicious SQL on your website. I usually just have a function escape_string(blah), which: Replaces escapes(\) with…


language agnostic - How do you typeset code elements in normal text?

What is the best way to typeset a function with arguments for readibility, brevity, and accuracy? I tend to put empty parentheses after the function name like func(), even if there are actually argum…


c# - Tab Escape Character?

I'm just in the process of parsing some text and can't remember what the escape character is for a tab in C#?…


SQL Server Escape an Underscore

How do I escape the underscore character? I am writing something like the following where clause and want to be able to find actual entries with_d at the end. Where Username Like '%_d'…



Python version of PHP's stripslashes

I wrote a piece of code to convert PHP's striplashes into valid Python[backslash] escapes: cleaned=stringwithslashes cleaned=cleaned.replace('\\n', '\n') cleaned=cleaned.replace('\\r', '\n') c…


c# - UrlEncode through a console application?

Normally I would just use: HttpContext.Current.Server.UrlEncode("url"); But since this is a console application, HttpContext.Current is always going to be null.Is there another method that does the sa…


c# - PHPs htmlspecialcharacters equivalent in.NET?

PHP has a great function called htmlspecialcharacters() where you pass it a string and it replaces all of HTML's special characters with their safe equivalents, it's almost a one stop shop for saniti…


Sanitising user input using Python

What is the best way to sanitize user input for a Python-based web application? Is there a single function to remove HTML characters and any other necessary characters combinations to prevent an XSS o…




string characters quotes special how html javascript with quote double