Skip to content

Commit e507adf

Browse files
committed
https://coding.net/u/coding/p/Coding-iOS/topic/157781
1 parent b26acb7 commit e507adf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Coding_iOS/Util/Manager/WebContentManager.m

+2-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ - (NSString *)codePatternedWithContent:(CodeFile *)codeFile isEdit:(BOOL)isEdit{
8181
if ([codeFile.file.lang isEqualToString:@"markdown"]) {
8282
patternedStr = [self.markdown_pattern_htmlStr stringByReplacingOccurrencesOfString:@"${webview_content}" withString:dataStr];
8383
}else{
84-
patternedStr = [dataStr stringByReplacingOccurrencesOfString:@"<" withString:@"&lt;"];
84+
patternedStr = [dataStr stringByReplacingOccurrencesOfString:@"&" withString:@"&amp;"];
85+
patternedStr = [patternedStr stringByReplacingOccurrencesOfString:@"<" withString:@"&lt;"];
8586
patternedStr = [patternedStr stringByReplacingOccurrencesOfString:@">" withString:@"&gt;"];
8687
patternedStr = [self.code_pattern_htmlStr stringByReplacingOccurrencesOfString:@"${file_code}" withString:patternedStr];
8788
patternedStr = [patternedStr stringByReplacingOccurrencesOfString:@"${file_lang}" withString:codeFile.file.lang];

0 commit comments

Comments
 (0)