Forum Moderators: open
Is it possible to create RSS feeds with Font tags? Will the RSS viewer ignore them? There's no easy way in which I can strip them out.
Any help is appreciated!
Thanks,
[edited by: werty at 9:35 pm (utc) on Mar. 22, 2005]
[edit reason] Removed URL Please See TOS #13 [/edit]
The best thing to do would be to find a way to strip out the markup -- it just doesn't make sense within the context of RSS to try to specify formatting.
To see if problems actually arise, you could just create the feed. Don't publicize it anywhere, but plug it into a variety of aggregators (including My Yahoo, Bloglines, and a couple of stand-alone readers) and see what happens.
strip.asp>
<%
Function gethtmlresult(DMOZURL,htmlbegin,htmlend)
Dim objXMLHTTP, htmlresult, htmlcontent
Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objXMLHTTP.Open "GET", DMOZURL, False
objXMLHTTP.Send
htmlcontent = objXMLHTTP.responseText
Set objXMLHTTP = Nothing
Dim begin, theend
begin = Instr(htmlcontent,htmlbegin)
theend = Instr(htmlcontent,htmlend)
If begin <> 0 and theend <> 0 Then
htmlresult = mid(htmlcontent,InStr(1,htmlcontent,htmlbegin,1), InStr(1,htmlcontent,htmlend,1) - InStr(1,htmlcontent,htmlbegin,1))
Else
Response.Write " "
End If
gethtmlresult = htmlresult
End Function
%>
dmoz.asp>
<% response.buffer=true %>
<!--#include file="strip.asp" -->
<%
If Request.QueryString() = "/" Then
Response.Redirect "http://www.yourpage.com"
End If
dim DMOZURL
DMOZURL = "http://dmoz.org" & request.querystring()
Dim DMOZresult
DMOZresult = gethtmlresult(DMOZURL,"</form>","<table width=""95%"" cellpadding=0 cellspacing=0>")
strtitle = request.querystring()
'strtitle = Replace(strtitle,"/"," ")
MyArray = Split(strtitle,"/")
i = (UBound(MyArray) - 1)
strtitle = MyArray(i)
strtitle = Replace(strtitle,"_"," ")
%>