{SERVER url}/store?keyword=test1\ntest2\rtest3\r\ntest4
The current URL store the keyword parameter into the database,
but somehow the \n and \r characters are not rendered into new lines. they are stored as \n and \r.
But when I use the URL-encoding it works.
\n - %0A
\r - %0D
{SERVER url}/store?keyword=test1%0Atest2%0Dtest3%0D%0Atest4
Does anyone knows what's happening exactly ?
I found an explanation for that:
Actually C, C++, Java and bunch of other languages allow the backslash escape styles, changing the meaning of the characters which follow the escape character to represent some control character/non-printing character, for example :
URL and URI use percent-encoding to quote characters with a special meaning such as line feed, tab, carriage return... So Simply having a \n in a URL will be considered as a '\' concatenated with a 'n'.
In results the value stored in the Database will be a "\n" sequence instead of an expected newline.