How to prevent < and > from becoming < and >.
Is it possible to create custom inventory rules that will become html tags? My goal is to create a dynamic html link. I understand this is probably taken out by default, but I would like to use it as a feature.
When i do ShellCommandTextReturn() and my command(s) output '<'s, they become converted to < in the html source. I want the '<'.
Thanks in advance,
Answers (2)
You will probably need to use a "\" as a break character before the command output string.
See here for an example: http://www.itninja.com/question/custom-inventory-problems
Comments:
-
I believe my problem is different. "\" is escaping characters that are being sent to be evaluated as part of the script. My script runs fine. However, there seems to be another interpreation after the script has run. The output is then converted. I tried escaping characters in the output to no avail. the result was:
>7) DeskLocation (CI):</td><td>\<<br/> - in the HTML code
I want < to actually be a < in the HTML code. Is this possible? Is that clear? Thanks for your help. - dyee 12 years ago-
What is the actual CIR? - jknox 12 years ago
-
ShellCommandTextReturn(powershell.exe -command "if (Test-Path -path 'SOME PATH TO MY SCRIPT') { write-host "\<" })
normally instead of write-host I would execute the script but I am just trying to prove the concept first.
I want the < to show in the html on the K1000 not <.. so it may have to do more with the tweaking the webserver on k1000 rather than the CIR or any script. - dyee 12 years ago-
The escape character would go in front of the entire argument, so something like this:
ShellCommandTextReturn(powershell.exe -command "if (Test-Path -path 'SOME PATH TO MY SCRIPT') { write-host \"<" })
If that doesn't work, submit a ticket to KACE support so it can be looked into. - jknox 12 years ago
-
that does not seem to work. - dyee 12 years ago
Did you find a solution to this? I'm trying to do something similar in my SQL reports but it appears the report engine defaults everything to text and is doing an HTML conversion to text when generated. I am trying to create HTML links inside my reports but I've had no luck.
Comments:
-
not yet.. still looking into it. seems like a configuration on the output engine - dyee 12 years ago