-
-
Notifications
You must be signed in to change notification settings - Fork 170
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
Question: How to escape a cr/lf character for browser type custom actions #34
Comments
Does it work without that escapes? Is the result the same with different browsers? |
I've tested it with every browser at my disposal: IE10, FF22, Chrome 22, opera 12 It seem as if nagstamon would prevent the correct parsing of the escape sequences. of course: creating emails this way without new lines works just fine |
I played with your example and found it not working with &subject but ?subject. Line 651-656 in Actions.py:
So yes URLs get cleaned. I tested Browser URLs without that _URLify() and it works as you expected. Obviously the browsers could URLify the URLS themselves and this method should not be needed here. |
Thanks for clarifying. nonetheless thanks for pointing out a syntactical error. the mailto protocol expects a question mark as separator between the first argument (most often the to field) and other arguments. additional parameters are linked with an ampersand. |
I think your way to send emails should work in future version - next github commit to be exact. |
Hello Henri,
normally one would escape an carriage return or line feed charater in URLs with %0d (ascii(13)) or %0a (ascii(10)) respectively.
Unfortunately that doesn't seem to work on browser type custom actions - at least on Windows with the current version 0.9.10.
The following example action does create a new email - to and subject fields are also correct, but the mail body is just the literal string "Bitte ein Ticket erstellen und bearbeiten.%0d%0aGruß Dominik"
Is this a bug or do I have to excape a new line differently? Sorry for asking stupid questions, but Google was not a friend of mine on this one yet...
Thanks
Dom
[action_Email to servicedesk]$HOST$ - $SERVICE$ - $STATUS-INFO$ &body=Bitte ein Ticket erstellen und bearbeiten.%0d%0aGruß Dominik
filter_target_service = True
leave_popwin_open = False
name = Email an Helpdesk
re_status_information_enabled = False
os =
description = Sendet eine Email an den Helpdesk
enabled = True
filter_target_host = True
re_status_information_pattern =
version = 1
re_host_reverse = False
re_status_information_reverse = False
re_service_reverse = False
re_service_enabled = False
re_host_pattern =
re_host_enabled = False
re_service_pattern =
type = browser
close_popwin = True
string = mailto:servicedesk@my.org&subject=Nagios Meldung:
The text was updated successfully, but these errors were encountered: