Commit 7d12c5ce authored by Carsten  Rose's avatar Carsten Rose
Browse files

Small fixes Manual.rst

parent bdc0c44c
......@@ -38,7 +38,8 @@ General
* Project homepage: https://qfq.io
* Latest releases: https://qfq.io/download
* Development: https://git.math.uzh.ch/typo3/qfq
* Slack: https://qfq-io.slack.com
* Chat: https://hello.math.uzh.ch > QFQ
.. _installation:
......@@ -1229,7 +1230,7 @@ Only in FormElement:
| **auto** | Form | | Only supported for FormElements. Most suitable checktype is dynamically evaluated based |
| | | | on native column definition, the FormElement type, and other info. See below for details. |
+------------------+------+-------+-------------------------------------------------------------------------------------------+
| **email** | Form | Query | [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,} |
| **email** | Form | Query | [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\\.[a-zA-Z]{2,} |
+------------------+------+-------+-------------------------------------------------------------------------------------------+
| **pattern** | Form | | Compares the value against a regexp. |
+------------------+------+-------+-------------------------------------------------------------------------------------------+
......@@ -1260,15 +1261,15 @@ The following `escape` & `action` types are available:
+=======+==================================================================================================================================+
| c | Config - the escape type configured in `configuration`_. |
+-------+----------------------------------------------------------------------------------------------------------------------------------+
| C | Colon ':' will be escaped against \\:. |
| C | Colon ':' will be escaped against \\: |
+-------+----------------------------------------------------------------------------------------------------------------------------------+
| d | Double ticks " will be escaped against \\". |
| d | Double ticks " will be escaped against \\\". |
+-------+----------------------------------------------------------------------------------------------------------------------------------+
| l | LDAP search filter values: `ldap-escape() <http://php.net/manual/en/function.ldap-escape.php>`_ (LDAP_ESCAPE_FILTER). |
+-------+----------------------------------------------------------------------------------------------------------------------------------+
| L | LDAP DN values. `ldap-escape() <http://php.net/manual/en/function.ldap-escape.php>`_ (LDAP_ESCAPE_DN). |
+-------+----------------------------------------------------------------------------------------------------------------------------------+
| s | Single ticks ' will be escaped against \\'. |
| s | Single ticks ' will be escaped against \\\'. |
+-------+----------------------------------------------------------------------------------------------------------------------------------+
| S | Stop replace. If the replaced value contains nested variables, they won't be replaced. |
+-------+----------------------------------------------------------------------------------------------------------------------------------+
......@@ -1302,12 +1303,13 @@ Escape
To 'escape' a character typically means: a character, which have a special meaning/function, should not treated as a special
character.
E.g. a string is surrounded by single ticks '. If such a string should contain a single tick inside (like 'Miller's'),
the inside single tick has to be escaped. This is typically done by a backlash: 'Millers\\'s'.
E.g. a string is surrounded by single ticks '. If such a string should contain the same single tick inside,
the inside single tick has to be escaped - if not, the string end's at the second tick, not the third. This is typically
done by a backlash: \\
QFQ offers different ways of escaping. Which of them to use, depends on the situation.
Especially variables used in SQL Statements might cause trouble when using: NUL (ASCII 0), \\n, \\r, \\, ', ", or Control-Z.
Especially variables used in SQL statements might cause trouble when using: NUL (ASCII 0), \\n, \\r, \\, ', ", or Control-Z.
Action
^^^^^^
......@@ -1341,7 +1343,7 @@ Default
* Any string can be given to define a default value.
* If a default value is given, it makes no sense to define more than one store: with a default value given, only the
first store is considered.
* If the default value contains a ':', that one needs to be escaped by '\'.
* If the default value contains a ':', that one needs to be escaped by \\
.. _`variable-type-message-violate`:
......@@ -1354,7 +1356,7 @@ If a value violates the sanitize class, the following actions are possible:
* 'e' - Instead of the value an empty string will be set as content.
* '0' - Instead of the value the string '0' will be set as content.
* 'custom text ...' - Instead of the value, the custom text will be set as content. If the text contains a ':', that one
needs to be escaped by '\'. Check `variable-escape`_ qualifier 'C' to let QFQ do the colon escaping.
needs to be escaped by \\ . Check `variable-escape`_ qualifier 'C' to let QFQ do the colon escaping.
.. _`sql-variables`:
......@@ -2191,9 +2193,9 @@ Comment- and space-character
The following applies to the fields `Form.parameter` and `FormElement.parameter`:
* Lines will be trimmed - leading and trailing spaces will be removed.
* If a leading and/or trailing space is needed, escape it: '\\ hello world \\' > ' hello world '.
* If a leading and/or trailing space is needed, escape it: \\ hello world \\ > ' hello world '.
* Lines starting with a '#' are treated as a comment and will not be parsed. Such lines are treated as 'empty lines'.
* The comment sign can be escaped with '\\'.
* The comment sign can be escaped with \\ .
.. _form-main:
......@@ -3128,7 +3130,7 @@ Checkboxes can be rendered in mode:
* ``itemList=red,blue,orange``
* ``itemList=1:red,2:blue,3:orange``
* If ':' or ',' are part of key or value, it needs to escaped by '\\'.
* If ':' or ',' are part of key or value, it needs to escaped by \\ .
E.g.: `itemList=1:red\\: (with colon),2:blue\\, (with comma),3:orange``
* *FormElement.sql1* = ``{{!SELECT id, value FROM someTable}}``
......@@ -3434,7 +3436,7 @@ Type: radio
2. *FormElement.parameter*:
* *itemList* = `<attribute>` E.g.: *itemList=red,blue,orange* or *itemList=1:red,2:blue,3:orange*
* If ':' or ',' are part of key or value, it needs to escaped by '\\'. E.g.: `itemList=1:red\\: (with colon),2:blue\\, (with comma),3:orange`
* If ':' or ',' are part of key or value, it needs to escaped by \\ . E.g.: `itemList=1:red\\: (with colon),2:blue\\, (with comma),3:orange`
3. Definition of the *enum* or *set* field (only labels, ids are not possible).
......@@ -3497,7 +3499,7 @@ Type: select
* *FormElement.parameter*:
* *itemList* = `<attribute>` - E.g.: *itemList=red,blue,orange* or *itemList=1:red,2:blue:3:orange*
* If ':' or ',' are part of key or value, it needs to escaped by '\\'. E.g.: `itemList=1:red\\: (with colon),2:blue\\, (with comma),3:orange`
* If ':' or ',' are part of key or value, it needs to escaped by \\ . E.g.: `itemList=1:red\\: (with colon),2:blue\\, (with comma),3:orange`
* Definition of the *enum* or *set* field (only labels, ids are not possible).
......@@ -5325,7 +5327,7 @@ Notice the space between "...world'" and "FROM ...".
Join mode: strip whitespace
"""""""""""""""""""""""""""
Ending a line with a '\\' strips all leading and trailing whitespaces of that line joins the line directly (no extra
Ending a line with a \\ strips all leading and trailing whitespaces of that line joins the line directly (no extra
space in between). E.g.::
10.sql = SELECT 'hello world', 'd:final.pdf \
......@@ -5334,7 +5336,7 @@ space in between). E.g.::
Results to: ``10.sql = SELECT 'hello world', 'd:final.pdf|p:id=export|t:Download' AS _pdf``
Note: the '\\' does not force the joining, it only removes the whitespaces.
Note: the \\ does not force the joining, it only removes the whitespaces.
To get the same result, the following is also possible::
......@@ -5805,7 +5807,7 @@ Question
If the user click on the negative answer (or waits for timout), the alert is closed and the browser does nothing.
* All parameter are optional.
* Parameter are separated by ':'
* To use ':' inside the text, the colon has to be escaped by '\\'. E.g. 'ok\\: I understand'.
* To use ':' inside the text, the colon has to be escaped by \\. E.g. 'ok\\ : I understand'.
+----------------------+--------------------------------------------------------------------------------------------------------------------------+
| Parameter | Description |
......@@ -6639,7 +6641,7 @@ Parameter and (element) sources
Check `wkhtmltopdf.txt <https://wkhtmltopdf.org/usage/wkhtmltopdf.txt>`_ for possible options. Be aware that
key/value tuple in the documentation is separated by a space, but to respect the QFQ key/value notation of URLs,
the key/value tuple in `p:...`, `u:...` or `U:...` has to be separated by '='. Please see last example below.
* If an option contains an '&' it must be escaped with double '\\'. See example.
* If an option contains an '&' it must be escaped with double \\ . See example.
Most of the other Link-Class attributes can be used to customize the link as well.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment