SelectPageSpaced


Problem

When you populate an input select with page link values it only works if you use a non-spaced link aliases. If you try to use spacing, generated by the page variables $Namespaced or $Titlespaced the spacing breaks the displayed input values (by causing the closing link markup ]]to display)

Solved

If the returned value will have spaces then you need to enclose in quotations the underlying value argument (variable) even if that entered value does not, itself, have any spaces.

Sample input select boxes

Select Name (ok)

Select Name Spaced (broken)

Select Name Spaced (fixed with quotes)

Select Title Spaced (broken)

Select Title Spaced (fixed with quotes)

Templates used for test

[[#selectname]]
(:template each:)(:input select pagelink [[{=$FullName}|{=$Name}]] "{=$Titlespaced}":)
(:template last:)(:input submit post Ok:)
[[#selectnameend]]

[[#selectnamespaced]]
(:template each:)(:input select pagelink [[{=$FullName}|{=$Namespaced}]]  "{=$Titlespaced}":)
(:template last:)(:input submit post Ok:)
[[#selectnamespacedend]]

[[#selectnamespacedfixed]]
(:template each:)(:input select pagelink "[[{=$FullName}|{=$Namespaced}]]"  "{=$Titlespaced}":)
(:template last:)(:input submit post Ok:)
[[#selectnamespacedfixedend]]

[[#selecttitlespaced]]
(:template each:)(:input select pagelink [[{=$FullName}|{=$Titlespaced}]]  "{=$Titlespaced}":)
(:template last:)(:input submit post Ok:)
[[#selecttitlespacedend]]

[[#selecttitlespacedfixed]]
(:template each:)(:input select pagelink "[[{=$FullName}|{=$Titlespaced}]]"  "{=$Titlespaced}":)
(:template last:)(:input submit post Ok:)
[[#selecttitlespacedfixedend]]

  0: 00.00 00.00 config start
  1: 00.01 00.01 config end
  2: 00.21 00.20 MarkupToHTML begin
  3: 00.22 00.21 FPLTemplate: Chain begin
  4: 00.22 00.21 FPLTemplate: FPLTemplateLoad
  5: 00.22 00.21 FPLTemplate: FPLTemplateDefaults
  6: 00.22 00.21 FPLTemplate: FPLTemplatePageList
  7: 00.22 00.21 MakePageList pre
  8: 00.22 00.21 PageListSources begin
  9: 00.22 00.21 PageStore::ls begin wiki.d/{$FullName}
 10: 00.22 00.22 PageStore::ls merge wiki.d/{$FullName}
 11: 00.23 00.22 PageStore::ls end wiki.d/{$FullName}
 12: 00.23 00.22 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 13: 00.23 00.22 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 14: 00.23 00.22 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 15: 00.23 00.22 PageListSources end count=1134
 16: 00.23 00.22 PageListSort pre ret=4 order=name
 17: 00.23 00.22 MakePageList items count=1134, filters=
 18: 00.23 00.22 MakePageList post count=1134, readc=0
 19: 00.23 00.22 PageListSort begin
 20: 00.23 00.22 PageListSort sort
 21: 00.24 00.23 PageListSort end
 22: 00.24 00.23 MakePageList end
 23: 00.24 00.23 FPLTemplate: FPLTemplatePmWikiOrg
 24: 00.24 00.23 MarkupToHTML begin
 25: 00.24 00.23 MarkupToHTML end
 26: 00.24 00.23 FPLTemplate: FPLTemplateSliceList
 27: 00.24 00.23 FPLTemplate: FPLTemplateFormat
 28: 00.25 00.24 MarkupToHTML begin
 29: 00.25 00.24 MarkupToHTML end
 30: 00.25 00.24 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
 31: 00.25 00.24 FPLTemplate: Chain end
 32: 00.25 00.24 FPLTemplate: Chain begin
 33: 00.25 00.24 FPLTemplate: FPLTemplateLoad
 34: 00.25 00.24 FPLTemplate: FPLTemplateDefaults
 35: 00.25 00.24 FPLTemplate: FPLTemplatePageList
 36: 00.25 00.24 MakePageList pre
 37: 00.25 00.24 PageListSources begin
 38: 00.25 00.24 PageStore::ls begin wiki.d/{$FullName}
 39: 00.26 00.25 PageStore::ls merge wiki.d/{$FullName}
 40: 00.26 00.25 PageStore::ls end wiki.d/{$FullName}
 41: 00.26 00.25 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 42: 00.26 00.25 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 43: 00.26 00.25 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 44: 00.26 00.25 PageListSources end count=1134
 45: 00.26 00.25 PageListSort pre ret=4 order=name
 46: 00.26 00.25 MakePageList items count=1134, filters=
 47: 00.26 00.25 MakePageList post count=1134, readc=0
 48: 00.26 00.25 PageListSort begin
 49: 00.26 00.25 PageListSort sort
 50: 00.28 00.26 PageListSort end
 51: 00.28 00.26 MakePageList end
 52: 00.28 00.26 FPLTemplate: FPLTemplatePmWikiOrg
 53: 00.28 00.26 MarkupToHTML begin
 54: 00.28 00.26 MarkupToHTML end
 55: 00.28 00.27 FPLTemplate: FPLTemplateSliceList
 56: 00.28 00.27 FPLTemplate: FPLTemplateFormat
 57: 00.28 00.27 MarkupToHTML begin
 58: 00.28 00.27 MarkupToHTML end
 59: 00.28 00.27 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
 60: 00.28 00.27 FPLTemplate: Chain end
 61: 00.28 00.27 FPLTemplate: Chain begin
 62: 00.28 00.27 FPLTemplate: FPLTemplateLoad
 63: 00.28 00.27 FPLTemplate: FPLTemplateDefaults
 64: 00.28 00.27 FPLTemplate: FPLTemplatePageList
 65: 00.28 00.27 MakePageList pre
 66: 00.28 00.27 PageListSources begin
 67: 00.28 00.27 PageStore::ls begin wiki.d/{$FullName}
 68: 00.29 00.27 PageStore::ls merge wiki.d/{$FullName}
 69: 00.29 00.28 PageStore::ls end wiki.d/{$FullName}
 70: 00.29 00.28 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 71: 00.29 00.28 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 72: 00.29 00.28 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 73: 00.29 00.28 PageListSources end count=1134
 74: 00.29 00.28 PageListSort pre ret=4 order=name
 75: 00.29 00.28 MakePageList items count=1134, filters=
 76: 00.29 00.28 MakePageList post count=1134, readc=0
 77: 00.29 00.28 PageListSort begin
 78: 00.29 00.28 PageListSort sort
 79: 00.30 00.29 PageListSort end
 80: 00.30 00.29 MakePageList end
 81: 00.30 00.29 FPLTemplate: FPLTemplatePmWikiOrg
 82: 00.30 00.29 MarkupToHTML begin
 83: 00.30 00.29 MarkupToHTML end
 84: 00.30 00.29 FPLTemplate: FPLTemplateSliceList
 85: 00.30 00.29 FPLTemplate: FPLTemplateFormat
 86: 00.31 00.29 MarkupToHTML begin
 87: 00.31 00.30 MarkupToHTML end
 88: 00.31 00.30 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
 89: 00.31 00.30 FPLTemplate: Chain end
 90: 00.31 00.30 FPLTemplate: Chain begin
 91: 00.31 00.30 FPLTemplate: FPLTemplateLoad
 92: 00.31 00.30 FPLTemplate: FPLTemplateDefaults
 93: 00.31 00.30 FPLTemplate: FPLTemplatePageList
 94: 00.31 00.30 MakePageList pre
 95: 00.31 00.30 PageListSources begin
 96: 00.31 00.30 PageStore::ls begin wiki.d/{$FullName}
 97: 00.32 00.30 PageStore::ls merge wiki.d/{$FullName}
 98: 00.32 00.30 PageStore::ls end wiki.d/{$FullName}
 99: 00.32 00.30 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
100: 00.32 00.30 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
101: 00.32 00.30 PageStore::ls end $FarmD/wikilib.d/{$FullName}
102: 00.32 00.30 PageListSources end count=1134
103: 00.32 00.30 PageListSort pre ret=4 order=name
104: 00.32 00.30 MakePageList items count=1134, filters=
105: 00.32 00.30 MakePageList post count=1134, readc=0
106: 00.32 00.30 PageListSort begin
107: 00.32 00.30 PageListSort sort
108: 00.33 00.32 PageListSort end
109: 00.33 00.32 MakePageList end
110: 00.33 00.32 FPLTemplate: FPLTemplatePmWikiOrg
111: 00.33 00.32 MarkupToHTML begin
112: 00.33 00.32 MarkupToHTML end
113: 00.33 00.32 FPLTemplate: FPLTemplateSliceList
114: 00.33 00.32 FPLTemplate: FPLTemplateFormat
115: 00.34 00.32 MarkupToHTML begin
116: 00.34 00.32 MarkupToHTML end
117: 00.34 00.32 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
118: 00.34 00.32 FPLTemplate: Chain end
119: 00.34 00.32 FPLTemplate: Chain begin
120: 00.34 00.32 FPLTemplate: FPLTemplateLoad
121: 00.34 00.32 FPLTemplate: FPLTemplateDefaults
122: 00.34 00.32 FPLTemplate: FPLTemplatePageList
123: 00.34 00.32 MakePageList pre
124: 00.34 00.32 PageListSources begin
125: 00.34 00.32 PageStore::ls begin wiki.d/{$FullName}
126: 00.34 00.32 PageStore::ls merge wiki.d/{$FullName}
127: 00.35 00.33 PageStore::ls end wiki.d/{$FullName}
128: 00.35 00.33 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
129: 00.35 00.33 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
130: 00.35 00.33 PageStore::ls end $FarmD/wikilib.d/{$FullName}
131: 00.35 00.33 PageListSources end count=1134
132: 00.35 00.33 PageListSort pre ret=4 order=name
133: 00.35 00.33 MakePageList items count=1134, filters=
134: 00.35 00.33 MakePageList post count=1134, readc=0
135: 00.35 00.33 PageListSort begin
136: 00.35 00.33 PageListSort sort
137: 00.36 00.34 PageListSort end
138: 00.36 00.34 MakePageList end
139: 00.36 00.34 FPLTemplate: FPLTemplatePmWikiOrg
140: 00.36 00.34 MarkupToHTML begin
141: 00.36 00.34 MarkupToHTML end
142: 00.36 00.34 FPLTemplate: FPLTemplateSliceList
143: 00.36 00.34 FPLTemplate: FPLTemplateFormat
144: 00.36 00.34 MarkupToHTML begin
145: 00.36 00.34 MarkupToHTML end
146: 00.36 00.34 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
147: 00.36 00.34 FPLTemplate: Chain end
148: 00.37 00.35 MarkupToHTML end
149: 00.37 00.35 MarkupToHTML begin
150: 00.38 00.36 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
151: 00.38 00.36 ReadApprovedUrls SiteAdmin.ApprovedUrls end
152: 00.39 00.37 MarkupToHTML end
153: 00.39 00.37 MarkupToHTML begin
154: 00.39 00.37 MarkupToHTML end
155: 00.39 00.37 now
Peak memory: 5,337,064 bytes