${getString(
@@ -325,28 +281,19 @@ const WebViewReader: React.FC
= props => {
swipeGestures
? `
`
: ''
diff --git a/src/screens/reader/utils/sanitizeChapterText.ts b/src/screens/reader/utils/sanitizeChapterText.ts
index 10274e68..a6c6fb2a 100644
--- a/src/screens/reader/utils/sanitizeChapterText.ts
+++ b/src/screens/reader/utils/sanitizeChapterText.ts
@@ -13,16 +13,25 @@ export const sanitizeChapterText = (
html: string,
options?: Options,
): string => {
+ if (html) {
+ html = html.replace(/</g, '<').replace(/>/g, '>');
+ }
let text = sanitizeHtml(html, {
- allowedTags: sanitizeHtml.defaults.allowedTags.concat(['img', 'input']),
+ allowedTags: sanitizeHtml.defaults.allowedTags.concat([
+ 'img',
+ 'input',
+ 'i',
+ 'em',
+ 'b',
+ 'a',
+ ]),
allowedAttributes: {
- 'img': ['src', 'type', 'file-path', 'file-id', 'offline', 'class'],
+ 'img': ['src', 'class'],
'a': ['href'],
'input': ['type', 'offline'],
},
- allowedSchemes: ['data', 'http', 'https'],
+ allowedSchemes: ['data', 'http', 'https', 'file'],
});
-
if (text) {
if (options?.removeExtraParagraphSpacing) {
text = text.replace(/<\s*br[^>]*>/gi, '\n').replace(/\n{2,}/g, '\n\n');
@@ -49,6 +58,5 @@ export const sanitizeChapterText = (
text =
"Chapter is empty.\n\nReport on github if it's available in webview.";
}
-
return text;
};
diff --git a/src/screens/settings/SettingsGeneralScreen/SettingsGeneralScreen.tsx b/src/screens/settings/SettingsGeneralScreen/SettingsGeneralScreen.tsx
index 6e0a5bfe..ed988e69 100644
--- a/src/screens/settings/SettingsGeneralScreen/SettingsGeneralScreen.tsx
+++ b/src/screens/settings/SettingsGeneralScreen/SettingsGeneralScreen.tsx
@@ -169,6 +169,7 @@ const GenralSettings: React.FC = ({ navigation }) => {
label={getString(
'moreScreen.settingsScreen.generalSettingsScreen.updateLibrary',
)}
+ description={'Not recommended for low devices'}
value={updateLibraryOnLaunch}
onPress={() =>
dispatch(