/build/static/layout/Breadcrumb_cap_w.png

How to prevent < and > from becoming < and &gt.

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 &lt in the html source.  I want the '<'.

Thanks in advance,


0 Comments   [ + ] Show comments

Answers (2)

Posted by: jknox 12 years ago
Red Belt
0

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>\&lt;<br/> - in the HTML code
    I want &lt 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 &lt.. 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
Posted by: pingpring 12 years ago
White Belt
0

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

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ