Changeset 179
- Timestamp:
- 07/12/06 17:22:09 (2 years ago)
- Files:
-
- trunk/pyramid/page.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/pyramid/page.py
r177 r179 19 19 20 20 def absoluteToRelative(tag,attr,dir): 21 VALID_URI_PREFIXES=('https://','http://','mailto:','ftp://')21 # See whether the attribute that should be rewritten exists on the tag. 22 22 try: 23 23 uri = tag[attr] … … 25 25 return 26 26 27 foundprefix = False 27 # Don't rewrite full URIs. 28 VALID_URI_PREFIXES=('https://','http://','mailto:','ftp://') 28 29 for prefix in VALID_URI_PREFIXES: 29 30 if uri.startswith(prefix): 30 foundprefix = True 31 if foundprefix == True: 32 return 31 return 33 32 34 33 if uri.startswith('/'):
