comparison MoinMoin/wikiutil.py @ 671:68d93872d4c9

removed duplicate code
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 21 May 2006 00:12:40 +0200
parents 016a8a3ef354
children b17cce67bcad
comparison
equal deleted inserted replaced
670:687633456631 671:68d93872d4c9
1045 1045
1046 return cfg._EXT_TO_PARSER.get(extension, cfg._EXT_TO_PARSER_DEFAULT) 1046 return cfg._EXT_TO_PARSER.get(extension, cfg._EXT_TO_PARSER_DEFAULT)
1047 1047
1048 1048
1049 ############################################################################# 1049 #############################################################################
1050 ### Misc 1050 ### Parameter parsing
1051 ############################################################################# 1051 #############################################################################
1052 1052
1053 def parseAttributes(request, attrstring, endtoken=None, extension=None): 1053 def parseAttributes(request, attrstring, endtoken=None, extension=None):
1054 """ 1054 """
1055 Parse a list of attributes and return a dict plus a possible 1055 Parse a list of attributes and return a dict plus a possible
1124 attrs[key.lower()] = val 1124 attrs[key.lower()] = val
1125 1125
1126 return attrs, msg or '' 1126 return attrs, msg or ''
1127 1127
1128 1128
1129 #############################################################################
1130 ### Misc
1131 #############################################################################
1129 def taintfilename(basename): 1132 def taintfilename(basename):
1130 """ 1133 """
1131 Make a filename that is supposed to be a plain name secure, i.e. 1134 Make a filename that is supposed to be a plain name secure, i.e.
1132 remove any possible path components that compromise our system. 1135 remove any possible path components that compromise our system.
1133 1136