Questions tagged [ampersand]

An ampersand (or epershand; "&") is a logogram representing the conjunction word "and". This symbol is a ligature of the letters in et, Latin for "and".

The word ampersand is a conflation of the phrase "and per se and", meaning "and [the symbol which] by itself [is] and".

445 questions
13
votes
2 answers

Cross Site Scripting (XSS): Do I need to escape the ampersand?

I want to escape for XSS in an HTML context, and so far I treat the <, >, and " characters. Apparently it is recommended to escape the ampersand as well, but why? (Other than for keeping the HTML valid, let's assume that this is not an issue) So…
Brent Gallagher
  • 165
  • 1
  • 7
13
votes
6 answers

php file_get_contents($url) & turns into &

I am trying to make a request to the coinbase api like this $url = "https://api.gdax.com/products/BTC-USD/candles?start=".date($format,$starting_date)."&end=".date($format,$ending_date)."&granularity=".$granularity; and then I pass that in…
Mubashar Abbas
  • 5,536
  • 4
  • 38
  • 49
13
votes
2 answers

are characters # or & allowed in xml?

i have values with special chars that encoded to ascii in my xml. for example : Žirmūnų but when i parse value name i get only & as value. Is it allowed…
yital9
  • 6,544
  • 15
  • 41
  • 54
12
votes
1 answer

SCSS: How to use two classes together with an ampersand?

I have some css rules to be applied for primary button, I did something like this: .my-btn { &--primary { padding: 10px; } } Now I want same rules to be applied for a primary button with "sm" class, I can do something like this: .my-btn { …
durgesh.patle
  • 710
  • 6
  • 24
12
votes
3 answers

Can I use unencoded ampersands (&) in html?

I'm building a website where I have to work with less then perfect masterdata (I guess I'm not the only one :-)) In my case I have to render an xml filte to html (using xsl). Sometimes the masterdata is using html-enitites allready (eg ;é in…
Peter
  • 47,963
  • 46
  • 132
  • 181
11
votes
2 answers

Ampersands (&) in xlink:href attributes of SVG images?

I'm building an SVG document which contains various image tags. The xlink:href (source URL) attributes for the images contain query strings with ampersands. If I escape them as %26 or the ascii encoding ? they're not valid query strings and the…
Peter K.
  • 151
  • 1
  • 6
10
votes
2 answers

SQL Server Full Text Search ampersand (&)

have problem with ampersand (&) How to search for the words (or sentences) that contain an ampersand (&). For example, in the database are: 1: "Johnson & Johnson" 2: "AT&T" 3: "Sample & Sample" How should I write a full text search query to search…
czarczarek
  • 123
  • 1
  • 6
10
votes
1 answer

Rewriting Ampersand URLs with IIS 7 Rewriting Module

How can I use an ampersand (&) in my url rewrite rules in the web.config file? I want to rewrite the url: http://www.foo.com/index.asp?SomeParameter=SomeValue&SomeId=00 to: http://www.foo.com/Section/Page I wrote the following rule in my…
Pato
  • 679
  • 8
  • 24
10
votes
1 answer

sas MACRO ampersand

%let test = one; %let one = two; %put &test; %put &&test; %put &&&test; %put &&&&test; %put &&&&&test; Well. I'm TOTALLY BEATEN by these ampersands. I don't understand why they need SO MANY ampersands before a macro variable. Is there any trick to…
zhuoer
  • 617
  • 1
  • 7
  • 15
9
votes
4 answers

How to disable/avoid Ampersand-Escaping in Java-XML?

I want to create a XML where blanks are replaced by  . But the Java-Transformer escapes the Ampersand, so that the output is &#160; Here is my sample code: public class Test { public static void main(String[] args) { …
oleh
  • 820
  • 2
  • 13
  • 28
9
votes
1 answer

Understanding CSS syntax, & + &

I'm looking at the following selector from a .css file: .tab { flex: 1 0 auto; height: 52px; & + & { border-left: 1px solid; } } I'm not familiar with the syntax of & + & {} - what does it mean?
K--
  • 594
  • 1
  • 8
  • 20
9
votes
3 answers

What is the difference between v-html and v-text?

I had the following code using v-text:

Output: Brand Name is B&C So I fixed it using v-html in the previous line:

Output: Brand Name is B&C My question is the following: Why…
Ced
  • 1,293
  • 5
  • 23
  • 34
9
votes
5 answers

The best way to store &(Ampersand) in MySQL database

I'm building a category list and I'm unsure how to store the Ampersand symbol in MySQL database. Is there any problem/disadvantage if I use '&'. Are there any differences from using it in a html format '&'?
inrob
  • 4,969
  • 11
  • 38
  • 51
8
votes
2 answers

Python gives 'Not well-formed xml' error because of presence of '&' characters

I am reading an xml file using Python. But my xml file contains & characters, because of which while running my Python code, it gives the following error: xml.parsers.expat.ExpatError: not well-formed (invalid token): Is there a way to ignore the &…
SyncMaster
  • 9,754
  • 34
  • 94
  • 137
8
votes
2 answers

What does the double ampersand return type mean?

I've stumbled upon such syntax as this: int&& move(int&& x) { return x; } which is supposedly how the std::move function is implemented, but I don't quite understand what does the return type (&&) actually means. I did googled it and failed to…
MoonBun
  • 4,322
  • 3
  • 37
  • 69
1
2
3
29 30