Author Topic: % in alias output  (Read 7709 times)

asipe

  • Senior Community Member
  • Posts: 113
  • Hero Points: 4
% in alias output
« on: June 15, 2007, 12:28:51 PM »
Is there any way to get a % character to show up in an alias when entered as a variable.  Take the following alias:

<table width="%(w)"/>

Where w is a variable that is entered by the user.   If 100% is entered then the output is:

<table width="100

The trialing "/> are dropped.   

Something I'm doing wrong?

Thanks -andy

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: % in alias output
« Reply #1 on: June 15, 2007, 12:36:32 PM »
% is the escape character for special handling in the alias expansion. %% inserts a percent character. 

Search for Alias escape sequences in the help guide for more examples of escape sequences.

asipe

  • Senior Community Member
  • Posts: 113
  • Hero Points: 4
Re: % in alias output
« Reply #2 on: June 15, 2007, 12:53:31 PM »
Lee:

Yep, that would be in the alias itself.   However, if the user is entering the value they shouldn't have to do that.   In the example I gave, the user would be prompted for width and would be forced to enter 100%%. 

I would think that any user input would be already escaped?

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: % in alias output
« Reply #3 on: June 15, 2007, 01:09:06 PM »
I see, yes, I'll learn to read the whole thing next time.  I've just tested what you've described, and I've confirmed that it is an issue.  The right thing to do in that case is to automatically escape the % character after prompting, but it's not doing that.  I will file a defect report and try to get that fixed for the next upcoming 12.0 release.  If your on the 12.0.1 release, I can generate a hotfix for the issue.   Contact support (support@slickedit.com) and reference this thread, and they can get that out to you.