diff --git a/CHANGELOG.md b/CHANGELOG.md
index c85a7d964e..b2595d3e8e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Build on windows ([#1048](https://github.com/scm-manager/scm-manager/issues/1048), [#1049](https://github.com/scm-manager/scm-manager/issues/1049), [#1056](https://github.com/scm-manager/scm-manager/pull/1056))
- Show specific notification for plugin actions on plugin administration ([#1057](https://github.com/scm-manager/scm-manager/pull/1057))
+- Invalid markdown could make parts of the page inaccessible ([#1077](https://github.com/scm-manager/scm-manager/pull/1077))
## 2.0.0-rc5 - 2020-03-12
### Added
diff --git a/scm-ui/ui-components/.storybook/config.js b/scm-ui/ui-components/.storybook/config.js
index 68dbde6db1..bfaea0245c 100644
--- a/scm-ui/ui-components/.storybook/config.js
+++ b/scm-ui/ui-components/.storybook/config.js
@@ -21,16 +21,27 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-import i18n from "i18next";
+import i18next from "i18next";
import { initReactI18next } from "react-i18next";
import { addDecorator, configure } from "@storybook/react";
import { withI18next } from "storybook-addon-i18next";
import "!style-loader!css-loader!sass-loader!../../ui-styles/src/scm.scss";
-import React, { ReactNode } from "react";
+import React from "react";
import { MemoryRouter } from "react-router-dom";
-i18n.use(initReactI18next).init({
+
+let i18n = i18next;
+
+// only use fetch backend for storybook
+// and not for storyshots
+if (!process.env.JEST_WORKER_ID) {
+ const Backend = require("i18next-fetch-backend");
+ i18n = i18n.use(Backend.default)
+}
+
+i18n
+.use(initReactI18next).init({
whitelist: ["en", "de", "es"],
lng: "en",
fallbackLng: "en",
@@ -39,6 +50,12 @@ i18n.use(initReactI18next).init({
},
react: {
useSuspense: false
+ },
+ backend: {
+ loadPath: "/locales/{{lng}}/{{ns}}.json",
+ init: {
+ credentials: "same-origin"
+ }
}
});
diff --git a/scm-ui/ui-components/package.json b/scm-ui/ui-components/package.json
index b15ff201dd..8900a701e3 100644
--- a/scm-ui/ui-components/package.json
+++ b/scm-ui/ui-components/package.json
@@ -38,6 +38,7 @@
"enzyme-context": "^1.1.2",
"enzyme-context-react-router-4": "^2.0.0",
"fetch-mock": "^7.5.1",
+ "i18next-fetch-backend": "^2.2.0",
"raf": "^3.4.0",
"react-test-renderer": "^16.10.2",
"storybook-addon-i18next": "^1.2.1",
diff --git a/scm-ui/ui-components/src/MarkdownView.stories.tsx b/scm-ui/ui-components/src/MarkdownView.stories.tsx
index ed9e18119f..464efe42cc 100644
--- a/scm-ui/ui-components/src/MarkdownView.stories.tsx
+++ b/scm-ui/ui-components/src/MarkdownView.stories.tsx
@@ -28,19 +28,24 @@ import styled from "styled-components";
import TestPage from "./__resources__/test-page.md";
import MarkdownWithoutLang from "./__resources__/markdown-without-lang.md";
+import MarkdownXmlCodeBlock from "./__resources__/markdown-xml-codeblock.md";
+import MarkdownInlineXml from "./__resources__/markdown-inline-xml.md";
+import Title from "./layout/Title";
+import { Subtitle } from "./layout";
const Spacing = styled.div`
padding: 2em;
`;
storiesOf("MarkdownView", module)
- .add("Default", () => (
-
{t("markdownErrorNotification.title")}
+{t("markdownErrorNotification.description")}
+
+ {xmlMarkupSample}
+
+ + {t("markdownErrorNotification.spec")}:{" "} + + GitHub Flavored Markdown Spec + +
++ markdownErrorNotification.title +
++ markdownErrorNotification.description +
+
+
+ \`\`\`xml
+<your>
+ <xml>
+ <content/>
+ </xml>
+</your>
+\`\`\`
+
+
+ + markdownErrorNotification.spec + : + + + GitHub Flavored Markdown Spec + +
+
+
+
+ <
+
+ project
+
+ [
+
+ ...
+
+ ]>
+
+
+
+ [...]
+
+
+
+ <
+
+ build
+
+ >
+
+
+
+
+ <
+
+ plugins
+
+ >
+
+
+
+ [...]
+
+
+
+ <
+
+ plugin
+
+ >
+
+
+
+
+ <
+
+ groupId
+
+ >
+
+ org.apache.maven.plugins
+
+ </
+
+ groupId
+
+ >
+
+
+
+
+ <
+
+ artifactId
+
+ >
+
+ maven-enforcer-plugin
+
+ </
+
+ artifactId
+
+ >
+
+
+
+
+ </
+
+ plugin
+
+ >
+
+
+
+
+ <
+
+ plugin
+
+ >
+
+
+
+
+ <
+
+ groupId
+
+ >
+
+ org.codehaus.mojo
+
+ </
+
+ groupId
+
+ >
+
+
+
+
+ <
+
+ artifactId
+
+ >
+
+ animal-sniffer-maven-plugin
+
+ </
+
+ artifactId
+
+ >
+
+
+
+
+ </
+
+ plugin
+
+ >
+
+
+
+
+ </
+
+ plugins
+
+ >
+
+
+
+
+ </
+
+ build
+
+ >
+
+
+
+ [...]
+
+
+
+ </
+
+ project
+
+ >
+
+
+
+