space Baylys
Just practicing to pass the Turing test.
space
space
space
space
Developer for Hire!
space
addedValues Plugin
space

Home

What's new

Bayly.Root

Cornershop Plugin

Career

edutools Root

Enhancements

Interests

linguist Plugin

Manila

Patches

space

mainresponder

manilaData

manilamacros

manilaSuite

space
space

admin

backups

discuss

gems

getCanonicalSiteName

hierarchyPage

hosting

html

mail

member

members

news

plugins

prefs

referer

renderNewsPage

rpcHandlers

rpcUtils

search

sendMail

siteStructure

staticRendering

space
space

convertFilename

convertUrl

discussCallback

displayRenderButton

drawNavigatorWithFiltering

filters

getRelativePath

getSuffix

patchLocalURLs

renderHierarchyPage

renderHomePage

renderPage

space

storyList

space

system

Patches by Group

Papers

Sales

Sign My Guestbook

User(land) Relations.

Contact Address

Search Baylys

urlchains

space
Join Now
Login
space space space

manilaSuite.staticRendering.convertUrl

When calculating a filename of a statically rendered page, the file element to be converted needs to be url decoded first, otherwise the length calculations will be incorrect and the url will be truncated.

Amended script follows

on convertUrl (url)
  «Pass this a filtered URL minus a suffix, this script will fix the filename and add the suffix.
 unaltered lines omitted
 
  if url endsWith "/"
 unaltered lines omitted
 
  local (ctFields = string.countFields (url, '/'))
  local (fname = string.nthField (url, '/', ctFields))
  url = string.popSuffix (url, '/')
  fname = manilaSuite.staticRendering.convertFilename (fname)
  url = url + "/" + fname
 
  return (url)

Relative to Frontier version 9.7b10