How-to XHTML 1.1 checks ampersand without avoiding it?

My problem is the following. I have an XHTML 1.1 page with form and input fields. One of the input fields contains a value that is a URI. This URI contains key-value pairs with an ampersand ( & ) as an argument separator, which will be passed as a GET request to another web application in the browser.

Normally I would use an object &to create ampersands for checking code like XHTML 1.1. My problem is that the application does not receive a GET request because (as expected) the browser does not understand how to handle &the URI.

So my question is how to write an ampersand without using an HTML object, so the browser still recognizes it as an argument separator, and the GET request is correctly passed to the web application.

I tried Hex (% 26) encoding an ampersand, but the browser still doesn’t "translate" it to the correct and personal one.

A related question, but it does not give an exact answer to the question I ask:

XHTML encoding and (Ampersand)

+5
source share
5 answers

I could no longer spend more time on it. I just changed the argument delimiter to also include a colon (;), so I can use it instead of an ampersand:

#cat .htaccess
php_value arg_separator.input "&;"
0
source

.

Node CDATA ( , /html, ).

, , , . . , .

+1

, , & , "&" ( &) GET. , Ajax GET, HTML. XHTML - , , .

: &

+1

() XHTML.

, & &

+1

Without code, it's hard to determine where you are trying to store this information; if you could post the code, we could better understand the problem.

One of the possible (if this is actually what you are facing) is to move the elements in the query line to other form elements, for example:

<form action="example.com/?foo=1&bar=2>
    <!-- ... -->
</form>

in

<form action="example.com">
    <input type="hidden" name="foo" value="1" />
    <input type="hidden" name="bar" value="2" />
    <!-- ... -->
</form>
0
source

All Articles