Struts2 escaping select values - select

I have text in a option (using a select tag) that has multiple spaces. These spaces are then converted into one space. I then tried to escape the spaces with but it then converts it to:
&ampnbsp;
which is not what I want. Is there anyway to disable escaping in Strut2 or have it always escape spaces for me for select tags? There is a way to turn off escapes for property tags but nothing for select, that I can see.

Try with attributes escape=false or escapeAmp=false

Related

VS Code - Select Current Word in JSON Files Includes Quotes

Using cmd+d to select the current word in VS Code also annoyingly selects any quotes that may surround the word. Is there any way to prevent this?
Edit: This appears to only happen in JSON files.
I can't reproduce the quotes selection with Cmd+D but I can with the Expand Selection command..
If you still have this issue. it may be fixed in vscode v1.69. The quotes will no longer be considered part of a json word. From the release notes:
Every language comes with a word pattern that defines which characters
belong to a word when in that language. JSON was different to all
other language in that it included the quotes of string literals and
the full string literal content. It now follows other languages and
contains just letters, numbers and hyphens.
The change will fix issues when expanding the selection (Command: Expand Selection), allow word completions inside strings and fix some
quick suggestion abnormalities.

TinyMCE converting space to

I am using TinyMCE 4 and in that, if I insert a space in the textarea between two word or characters and then check the source, the space converted to .
I have tried this solution, but that only resolves the issue partially. This is because, if I enter a single space between two characters or words, then TinyMCE doesn't add , but if I add two consecutive spaces between two characters or words, then it makes the second space .
Any work around on this?
TinyMCE is adding hard spaces when you type multiple spaces into the editor - HTML does not show multiple normal whitespace characters so you can't get (per your example) two spaces between letters with just regular spaces. Using hard spaces for every other space allows content authors to use spaces within content and get a rendered result that matches what they type in the editor.
If you render that HTML without hard spaces there would just be one space between each set of characters regardless of how many spaces you put in the HTML source.
The net is that the editor is doing what it needs to do to allow you to see multiple spaces.

How to escape '|" character into an org-mode table

I am building some tables in org-mode and I need to enter "||" into the table (for the logical OR command) and nothing I try turns the two characters off as table constructors.
I've tried single quotes, double quotes, backticks and prefacing them with '\'. I've also tried every permutation of using ':=' to get a literal string and they don't work.
// Tony Williams
Depending on what you want to do with the output of the table, you could use alternative unicode characters that look like vertical pipes (or double vertical pipes). Examples:
This is the pipe character written twice (as for logical OR):
||
Those are similar (or not too different) looking unicode characters
‖ - ¦¦ - ❘❘
Of course, this won't work for you if you are not just interested in the looks (but escaping pipes would not work either).
See here more unicode characters you might like better than those 3 above
It turns out that you can use HTML entities in org-mode tables for output via pandoc.
\vert{} doesn't work but I went to the table pointed to by MrSpock and tried the HTML entity and the output when run through pandoc was perfect. || gives me '||'. I also tested a few other HTML entities and they also worked fine.
Well, if the goal is to export your notes, then
$\lvert\mathbb{N}\rvert$
would be an equivalent of
$|\mathbb{N}|$
Character is: \vert
Example: a \vert\ b -> a | b

Allowed characters in CSS 'content' property?

I've read that we must use Unicode values inside the content CSS property i.e. \ followed by the special character's hexadecimal number.
But what characters, other than alphanumerics, are actually allowed to be placed as is in the value of content property? (Google has no clue, hence the question.)
The rules for “escaping” characters are in the CSS 2.1 specification, clause 4.1.3 Characters and case. The special rules for quoted strings, as in content property value, are in clause 4.3.7 Strings. Within a quoted string, any character may appear as such, except for the character used to quote the string (" or '), a newline character, or a backslash character \.
The information that you must use \ escapes is thus wrong. You may use them, and may even need to use them if the character encoding of the document containing the style sheet does not let you enter all characters directly. But if the encoding is UTF-8, and is properly declared, then you can write content: '☺ Я Ω ⁴ ®'.
As far as I know, you can insert any Unicode character. (Here's a useful list of Unicode characters and their codes.)
To utilize these codes, you must escape them, like so:
U+27BA Becomes \27BA
Or, alternatively, I think you may just be able to escape the character itself:
content: '\➺';
Source: http://mathiasbynens.be/notes/css-escapes

CKEditor: Is there a method to do escape character job?

The content output by the editor is with html tag,
but I want store them into the Mongodb, so I think I need to do a escape character job,
Is the ckeditor own escape character method?
BTW, is it necessary to do escape character job? Or I better convert them to other data format?
Native JS methods will solve your problem:
escape( 'Foo' )
> %3Ca%20href%3D%22%23%22%3EFoo%3C/a%3E
unescape( '%3Ca%20href%3D%22%23%22%3EFoo%3C/a%3E' )
> Foo