diff options
-rw-r--r-- | src/gopher.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gopher.c b/src/gopher.c index d12745ec..914f57ba 100644 --- a/src/gopher.c +++ b/src/gopher.c | |||
@@ -158,15 +158,22 @@ static iBool convertSource_Gopher_(iGopher *d) { | |||
158 | if (startsWith_Rangecc(path, "URL:")) { | 158 | if (startsWith_Rangecc(path, "URL:")) { |
159 | format_String(buf, | 159 | format_String(buf, |
160 | "=> %s %s\n", | 160 | "=> %s %s\n", |
161 | cstr_Rangecc((iRangecc){ path.start + 4, path.end }), | 161 | cstr_String(withSpacesEncoded_String(collectNewRange_String |
162 | ((iRangecc){ path.start + 4, path.end }))), | ||
162 | cstr_Rangecc(text)); | 163 | cstr_Rangecc(text)); |
163 | } | 164 | } |
164 | appendData_Block(d->output, constBegin_String(buf), size_String(buf)); | 165 | appendData_Block(d->output, constBegin_String(buf), size_String(buf)); |
165 | iEndCollect(); | 166 | iEndCollect(); |
166 | break; | 167 | break; |
167 | } | 168 | } |
168 | default: | 169 | default: /* all unknown types */ |
169 | break; /* Ignore unknown types. */ | 170 | setPre_Gopher_(d, iFalse); |
171 | appendData_Block(d->output, text.start, size_Range(&text)); | ||
172 | appendCStr_Block(d->output, "\n"); | ||
173 | setPre_Gopher_(d, iTrue); | ||
174 | appendData_Block(d->output, path.start, port.end - path.start); | ||
175 | appendCStr_Block(d->output, "\n"); | ||
176 | break; | ||
170 | } | 177 | } |
171 | delete_String(buf); | 178 | delete_String(buf); |
172 | } | 179 | } |