Subversion Repositories DevTools

Rev

Rev 7162 | Rev 7261 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7162 Rev 7250
Line 227... Line 227...
227
       Dim reason       : reason = fields(9)
227
       Dim reason       : reason = fields(9)
228
       Dim state        : state = fields(10)
228
       Dim state        : state = fields(10)
229
       Dim buildId      : buildId = fields(11)
229
       Dim buildId      : buildId = fields(11)
230
       Dim tcount       : tcount = fields(13)
230
       Dim tcount       : tcount = fields(13)
231
       Dim pkg_version  : pkg_version = fields(14)
231
       Dim pkg_version  : pkg_version = fields(14)
232
       Dim description  : description = CleanUp(Server.HTMLEncode(fields(15)))
232
       Dim description  : description = CleanUpJson(Server.HTMLEncode(fields(15)))
233
       Dim comments     : comments = CleanUp(Server.HTMLEncode(fields(16)))
233
       Dim comments     : comments = CleanUpJson(Server.HTMLEncode(fields(16)))
234
       Dim buildTime    : buildTime = Server.HTMLEncode(fields(17))
234
       Dim buildTime    : buildTime = Server.HTMLEncode(fields(17))
235
 
235
 
236
       Set fields = nothing
236
       Set fields = nothing
237
 
237
 
238
        If buildTime <= 0 Then buildTime = ""
238
        If buildTime <= 0 Then buildTime = ""
Line 267... Line 267...
267
 
267
 
268
'Return the object
268
'Return the object
269
Response.Write oJSON.JSONoutput()
269
Response.Write oJSON.JSONoutput()
270
Set oJSON = Nothing
270
Set oJSON = Nothing
271
Call Destroy_All_Objects
271
Call Destroy_All_Objects
272
 
-
 
273
' Quick and ugly code to attempt to remove nasty characters from strings
-
 
274
' In particular some unicode characters that mess with the json decoder
-
 
275
Function CleanUp (input)
-
 
276
      Dim objRegExp, outputStr
-
 
277
      Set objRegExp = New Regexp
-
 
278
 
-
 
279
      objRegExp.IgnoreCase = True
-
 
280
      objRegExp.Global = True
-
 
281
      objRegExp.Pattern = "((?![\[\]\(\)\{\}\$-_?/""';:.,a-zA-Z0-9]).)+"
-
 
282
      outputStr = objRegExp.Replace(input, " ")
-
 
283
 
-
 
284
      CleanUp = outputStr
-
 
285
    End Function
-
 
286
%>
272
 %>