escaping Questions
4
I have the following YAML fragment:
description: |
"API for bean consuming applications.
Examples: painted pony, lima bean"
Swagger editor interprets the colon (:) as a special character, desp...
4
Solved
I have a dialog form and I want to have it closed gracefully when a user hits the escape key. When the user hits the escape key the form is shut down immediately but for some reason the dialog form...
Lozenge asked 24/8, 2019 at 13:3
5
Solved
I'm trying to post on LinkedIn via their API.
Endpoint https://api.linkedin.com/rest/posts.
The integration is working fine until I try to post something with a ( character. Redigated example:
{
...
Cestode asked 14/9, 2022 at 6:59
14
Solved
I'm outputting values from a database (it isn't really open to public entry, but it is open to entry by a user at the company -- meaning, I'm not worried about XSS).
I'm trying to output a tag lik...
Argueta asked 5/1, 2010 at 4:30
4
Solved
I'm currently localizing my Django app. All other translations work fine except percent-sign inside blocktrans tags.
In my template I have {% blocktrans %}Original % blocktrans{endblocktrans %}.
...
Pelvis asked 27/3, 2011 at 8:59
5
Solved
I use Jackson to generate JSON objects and write them directly into HTML's tag, like this:
<script>
var data = $SomeJacksonWrapper.toJson($data);
</script>
This code breaks if som...
3
I was wondering how would you escape special characters in nodejs. I have a string $what$ever$
and I need it escaped like \$what\$ever\$ before i call a python script with it.
I tried querystring ...
Ratiocinate asked 17/3, 2014 at 21:37
15
Solved
I'm using git, then posting the commit message and other bits as a JSON payload to a server.
Currently I have:
MSG=`git log -n 1 --format=oneline | grep -o ' .\+'`
which sets MSG to something l...
11
Solved
The MySQL documentation says that it should be \'. However, both scite and mysql shows that '' works. I saw that and it works. What should I do?
5
Say I want to encode an article title in a URL and that contains a slash. If I URL encode the article title I get:
http://example.com/articles/foo%2fbar/view/
NGINX passes this to my FastCGI app...
4
Solved
If I write something like this:
string s = @"...."......";
it doesn't work.
If I try this:
string s = @"...\".....";
it doesn't work either.
How can I add a " character to a multi line st...
2
Solved
Im working on a program to interface with some hardware that is sending data that has been encoded and wrapped to send within a CDATA block in an XML document.
the software in the device as far as...
Khano asked 7/11, 2014 at 13:40
18
Solved
In my bash script I have an external (received from user) string, which I should use in sed pattern.
REPLACE="<funny characters here>"
sed "s/KEYWORD/$REPLACE/g"
How can I escape the $REPL...
6
Solved
I'm coding a program that reads data directly from user input and was wondering how could I read all data until ESC button on keyboard is pressed. I found only something like this:
std::string lin...
7
Solved
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 string
I'm trying to type in a path and it thinks it is an escape se...
6
Solved
I am running a process in a command window (Windows 7, Python 3.1) where I would like the user to abort the process by pressing Esc key. However, pressing Esc doesn't appear to do anything, the loo...
16
Solved
I'm trying to put some anti sql injection in place in java and am finding it very difficult to work with the the "replaceAll" string function. Ultimately I need a function that will convert any exi...
Alcatraz asked 28/11, 2009 at 16:11
6
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'...
6
Solved
What's the easiest way to convert a C++ std::string to another std::string, which has all the unprintable characters escaped?
For example, for the string of two characters [0x61,0x01], the result...
7
Solved
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 any way to get a double quote in a verbatim string liter...
Bruch asked 18/12, 2009 at 15:36
5
Solved
How can I properly escape a quote in a search string when using findstr.exe?
Example:
findstr /misc:"namespace=\"" *.cs > ns.txt
This outputs to the console, instead of to the file I specifi...
Herzog asked 13/2, 2011 at 6:29
20
Solved
How do I insert a value in MySQL that consist of single or double quotes. i.e
This is Ashok's Pen.
The single quote will create problems. There might be other escape characters.
How do you insert ...
5
Solved
How does one use a literal "{{" in a Mustache template?
On a side note, if I'm using custom tags, like <% and %>, is there a way to write "<%"?
Theoretically, I could use different tags...
4
Solved
Specifically, what's the easiest and most idiomatic way to replace special XML characters in a string. E.g., what's the easiest and most idiomatic way to convert <Jack & Jill> to &lt;...
3
Solved
I am trying to invoke a curl command in powershell and pass some JSON information.
Here is my command:
curl -X POST -u username:password -H "Content-Type: application/json" -d "{ "fields": { "pr...
Badalona asked 4/11, 2015 at 16:18
© 2022 - 2024 — McMap. All rights reserved.