Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old January 30th, 2001, 05:34 AM
Teedeepee Teedeepee is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 18 Teedeepee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 54 m 14 sec
Reputation Power: 0
Cool

Hi all,

I'm trying to set a variable which looks like

<!--#set var="title" value="<script>document.write(greeting);</script>" -->

When I echo the "title" variable, though, HTML characters such as < and > appear in ISO format < and > thus ruining my script.

Any idea on how to parse the characters the right way?

Thanks.
TdP

Reply With Quote
  #2  
Old January 31st, 2001, 03:54 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Whichever characters causing troubles, escape it with \.

Reply With Quote
  #3  
Old February 1st, 2001, 02:44 AM
Teedeepee Teedeepee is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 18 Teedeepee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 54 m 14 sec
Reputation Power: 0
Thumbs up Thanks freebsd!

For the benefit of other users, I found the way to parse the characters as I wanted to in the Apache reference docs at http://www.apache.org.

The trick is to set an "encoding" attribute to "none" just before the "var" in the echo command:

<!--#echo encoding="none" var="title" -->

Similarly, encoding="URL" can be used to %-encode paths when manipulated by SSI.

Cheers,

Teedeepee

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Echoing the right way with XSSI


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway