First version
This commit is contained in:
11
CHDataManagement/Extensions/String+Extensions.swift
Normal file
11
CHDataManagement/Extensions/String+Extensions.swift
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
extension String {
|
||||
|
||||
func htmlEscaped() -> String {
|
||||
replacingOccurrences(of: "&", with: "&")
|
||||
.replacingOccurrences(of: "\"", with: """)
|
||||
.replacingOccurrences(of: "'", with: "'")
|
||||
.replacingOccurrences(of: "<", with: "<")
|
||||
.replacingOccurrences(of: ">", with: ">")
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user