-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Date format *\* backslash to escape characters #99
Comments
Under which plugin version? |
Sorry, I'm using version 3.2.9.1 |
If I include these |
This one is terrible. Seems like there is ongoing WordPress discussion on magic quotes, see for example, http://wordpress.stackexchange.com/questions/21693/wordpress-and-magic-quotes. WP adds magic quotes to the POST data. Anyway I did some fix, which may get things messed up again later if WP changes its code. I pushed it to the latest master branch. Please, close the issue if it tests ok. Below is the description copied here from the code, just to keep a record:
|
It's working fine now. 👍 |
One more doubt on this topic: For what I've seen, both can do the same. After checking on this (backslash) issue, a lot of options of qtranslate_options.php need to be changed from |
I am not really sure, this piece came from the original qTranslate, and touched twice for bug reported, including yours. I think the whole date/time format framework needs to be re-designed by the newer standard, but this is low priority for now.
Are you sure about this? It was there for ages. Will we potentially break anyone? If you are sure it is needed, would you mind to PR on this? |
I didn't saw this because I had author metadata hidden in my theme. The word de is returned to me as Day of the month+Timezone identifier. It only returns as de if coded as It's easy to identify this editining one language for testing, pasting all those old strings hardcoded in qtranslate_options.php. Please check this before accepting the PR, I've already included in a prevous PR earlier today https://github.com/qTranslate-Team/qtranslate-x/pull/107/files#diff-a9d9901d065dd46182dc2bc4043b9ed1 |
Should the format editing through the "Edit language" form be working? I'm trying to set up another language (Basque) and escape characters ( |
Which version are you using? |
3.2.9 release. Should I upgrade to the latest alpha pre-release? |
As I wrote above, it's solved since v.3.2.9.5. |
In the description of this setting it says this:
At least in the function date one can use escaping characters as
at
by preceding it with backslash\a\t
as described here:https://codex.wordpress.org/Formatting_Date_and_Time
The problem is that If I add this
\
(backslash) in the Date format field, after saving it adds an aditional backslash:\\
:Example:
if I write want to escape
at
I have to write\a\t\
but after saving it qtranslate returns\\a\\t
.I've tried to write just
at
but of course it don't recognize this as escaping non-string text and doesn't add automatically the needed single\a\t
.The text was updated successfully, but these errors were encountered: