|
138 | 138 |
|
139 | 139 | /** |
140 | 140 | * Parses a resource name into its component parts. Resource names |
141 | | - * look like: module/name.ext!strip, where the !strip part is |
| 141 | + * look like: module/name.ext?strip, where the ?strip part is |
142 | 142 | * optional. |
143 | 143 | * @param {String} name the resource name |
144 | 144 | * @returns {Object} with properties "moduleName", "ext" and "strip" |
|
149 | 149 | modName = name.substring(0, index), |
150 | 150 | ext = name.substring(index + 1, name.length); |
151 | 151 |
|
152 | | - index = ext.indexOf("!"); |
| 152 | + index = ext.indexOf("?"); |
153 | 153 | if (index !== -1) { |
154 | 154 | //Pull off the strip arg. |
155 | 155 | strip = ext.substring(index + 1, ext.length); |
|
201 | 201 | }, |
202 | 202 |
|
203 | 203 | load: function (name, req, onLoad, config) { |
204 | | - //Name has format: some.module.filext!strip |
| 204 | + //Name has format: some.module.filext?strip |
205 | 205 | //The strip part is optional. |
206 | 206 | //if strip is present, then that means only get the string contents |
207 | 207 | //inside a body tag in an HTML string. For XML/SVG content it means |
208 | 208 | //removing the <?xml ...?> declarations so the content can be inserted |
209 | 209 | //into the current doc without problems. |
210 | 210 |
|
211 | 211 | var parsed = text.parseName(name), |
212 | | - url = req.toUrl(parsed.moduleName + "." + parsed.ext); |
| 212 | + nonStripName = parsed.moduleName + '.' + parsed.ext, |
| 213 | + url = req.toUrl(nonStripName); |
213 | 214 |
|
214 | 215 | //Load the text. Use XHR if possible and in a browser. |
215 | 216 | if (!hasLocation || text.canUseXhr(url)) { |
|
220 | 221 | //Need to fetch the resource across domains. Assume |
221 | 222 | //the resource has been optimized into a JS module. Fetch |
222 | 223 | //by the module name + extension, but do not include the |
223 | | - //!strip part to avoid file system issues. |
224 | | - req([name], function (content) { |
| 224 | + //?strip part to avoid file system issues. |
| 225 | + req([nonStripName], function (content) { |
225 | 226 | text.finishLoad(parsed.moduleName + '.' + parsed.ext, |
226 | 227 | parsed.strip, content, onLoad, config); |
227 | 228 | }); |
|
246 | 247 |
|
247 | 248 | //Leverage own load() method to load plugin value, but only |
248 | 249 | //write out values that do not have the strip argument, |
249 | | - //to avoid any potential issues with ! in file names. |
| 250 | + //to avoid any potential issues with ? in file names. |
250 | 251 | text.load(nonStripName, req, function (value) { |
251 | 252 | //Use own write() method to construct full module value. |
252 | 253 | text.write(pluginName, nonStripName, function (contents) { |
|
0 commit comments