Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: pkg/analyzer/lib/src/summary/public_namespace_computer.dart

Issue 2665213003: Encode URIs stored in unlinked summaries to make them Uri.parse() safe. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/summarize_ast.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/public_namespace_computer.dart
diff --git a/pkg/analyzer/lib/src/summary/public_namespace_computer.dart b/pkg/analyzer/lib/src/summary/public_namespace_computer.dart
index 203043a1b9528b1f147f23169e124e1851c96334..119169e979cbf652944434dd5c002588ded41aef 100644
--- a/pkg/analyzer/lib/src/summary/public_namespace_computer.dart
+++ b/pkg/analyzer/lib/src/summary/public_namespace_computer.dart
@@ -147,8 +147,9 @@ class _PublicNamespaceVisitor extends RecursiveAstVisitor {
@override
visitExportDirective(ExportDirective node) {
+ String uriStr = Uri.encodeFull(node.uri.stringValue ?? '');
Brian Wilkerson 2017/02/01 17:28:24 Consider a getter (such as 'encodedUri') on UriBas
exports.add(new UnlinkedExportPublicBuilder(
- uri: node.uri.stringValue,
+ uri: uriStr,
combinators: node.combinators
.map((Combinator c) => c.accept(new _CombinatorEncoder()))
.toList(),
@@ -178,7 +179,8 @@ class _PublicNamespaceVisitor extends RecursiveAstVisitor {
@override
visitPartDirective(PartDirective node) {
- parts.add(node.uri.stringValue ?? '');
+ String uriStr = Uri.encodeFull(node.uri.stringValue ?? '');
+ parts.add(uriStr);
}
@override
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/summarize_ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698