Don't print out a string literally

Post Reply
rluan
Posts: 29
Joined: Mon Jul 23, 2001 1:22 pm

Don't print out a string literally

Post by rluan »

Hi,

When printing out a string, how to make the output respect the Html meaning of some expressions such as "<a href=></a>" rather than print out this string literally?

For example, if I literally type

<a href=somesite.com>somesite</a>

in vortext script, it prints out a highlighted 'somesite' which links to somesite.com site. But if I assign this statement to a variable $someVariable with

<$someVariable = "<a href=somesite.com>somesite</a>">

and then print out "$someVariable", the output is the literial string rather than the desired link !! Is
there a way to print out a link in this case?

Thanks.
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

Don't print out a string literally

Post by mark »

Use <verb noesc>, <fmt "%s">, or <send>.
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

Don't print out a string literally

Post by mark »

sorry, <verb> won't apply to printing variables. use <fmt> or <send>.
rluan
Posts: 29
Joined: Mon Jul 23, 2001 1:22 pm

Don't print out a string literally

Post by rluan »

Yehh....I recall now !! Thanks a lot. I have to say that Thunderstone's customer support is the best. Thanks again to Mark, Kai, John.
KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

Don't print out a string literally

Post by KMandalia »

what if I have <br> in the string I want to print out.

fmt or send prints it out as is. How do I display html formatted output?
User avatar
John
Site Admin
Posts: 2597
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Don't print out a string literally

Post by John »

Saying $var will output the string formatted either text or html depending on the current vortex output mode. To force html escaping <fmt %H $var>
John Turnbull
Thunderstone Software
KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

Don't print out a string literally

Post by KMandalia »

I don't think this answers my question.

THE Mortgage Business Solution - created by Credit Unions - for Credit Unions: Unparalleled performance and value. <br> A web-based mortgage origination solution created by Boeing Employees Credit Union and DEXMA and powered by Fannie Mae. <br> <br> > 50-60% of mortgage applications completed and submitted by <B>members</B> themselves. <br> > Used for all channels - Internet 24/7, loan officers, branches and Call Center. <br> > Helps increase mortgage lending 250-500% at lower cost to become <B>member's</B> PFI. <br> > CUSO version provides co-branding for a mortgage CUSO and its credit union clients.

How do I show it formatted?
User avatar
John
Site Admin
Posts: 2597
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Don't print out a string literally

Post by John »

What exactly is in the variable, and what do you want printed. Is the above the HTML source or what you see in the browser?

There also appear to be bold tags, which I can't tell if they are printing as you want or not.
John Turnbull
Thunderstone Software
KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

Don't print out a string literally

Post by KMandalia »

this is $dabstact.

I want to print $dabstract respecting all <b> and <br> tags. so it it sees <br> it should insert a break etc.

<b> tags are printing fine. What you see above is when I do

<fmt "%H" $dabstract>
KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

Don't print out a string literally

Post by KMandalia »

Never mind. Did the following in result_abstract

<fmt "%!H" $dabstract><!--nop-->

It now looks like it should

THE Mortgage Business Solution - created by Credit Unions - for Credit Unions: Unparalleled performance and value.
A web-based mortgage origination solution created by Boeing Employees Credit Union and DEXMA and powered by Fannie Mae.

> 50-60% of mortgage applications completed and submitted by members themselves.
> Used for all channels - Internet 24/7, loan officers, branches and Call Center.
> Helps increase mortgage lending 250-500% at lower cost to become member's PFI.
> CUSO version provides co-branding for a mortgage CUSO and its credit union clients.
Post Reply