<%@ Language=VBScript%> <%option explicit%> <% function restirarlink(texto) dim Matches, Match dim ma dim p_regexp Set p_regexp = New RegExp p_regexp.IgnoreCase = True p_regexp.Global = True p_regexp.Pattern = "(href=\"")([\.a-zA-Z0-9/\?=&_-]{5,150})(\"")" Set Matches = p_regexp.Execute(texto) for each match in Matches ' ma = match.SubMatches(0) & match.SubMatches(1) ' if mid(ma,len(ma),1)="." then ma=left(msa,len(ma)-1) ' if mid(ma,len(ma),1)="-" then ma=left(ma,len(ma)-1) texto = Replace(texto, match.SubMatches(1), "#") next restirarlink = texto Set Matches = nothing end function dim idnew dim idEdicao dim currentId dim sModel dim sNew 'Edicao dim IdEdicaoActual idEdicao = Request.QueryString("idEdicao") idEdicaoActual = clng(getEdicaoActual()) if IdEdicao = "" then IdEdicao = idEdicaoActual else IdEdicao = clng(IdEdicao) end if 'Parametros idnew = Request.QueryString("id") currentId = Request.ServerVariables("QUERY_STRING") 'Modelo sModel = getModel(c_RootPath & "\modelos\modelo_printpreview.htm") 'Print Version sNew = showNoticia(idnew, "index.asp", "../fotos/" & idEdicao & "/", TitPagina,0) ' sNew = replace(sNew, "href=""", "href=""../") 'Fix linkSeccao snew = restirarlink(sNew) sModel = replace(sModel, c_Noticias_Marca, sNew) sModel = replace(sModel, c_Edicao_Marca, ShowDadosEdicao(idEdicao)) sModel = replace(sModel, c_Data_Marca, now()) 'sModel = replace(sModel, c_url, server.HTMLEncode("../index.asp?" & currentId)) sModel = replace(sModel, c_OrigVersionShow_Marca, "http://" & Request.ServerVariables("SERVER_NAME") & server.HTMLEncode("/index.asp?" & currentId)) 'titulo sModel = replace(sModel, c_Titulo_Marca, " - " & TitPagina) Response.Write sModel %>