Skip to content

Commit

Permalink
removed tniymce as it has many vurnebilities
Browse files Browse the repository at this point in the history
  • Loading branch information
Raj committed May 12, 2024
1 parent 3325583 commit 47bd2f7
Show file tree
Hide file tree
Showing 183 changed files with 14 additions and 126,056 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/github-pages-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
run: dotnet publish ./src/AspNet.Core.Blazor.WebAssembly/AspNet.Core.Blazor.WebAssembly.csproj -c Release

- name: Rewrite base href
uses: SteveSandersonMS/ghaction-rewrite-base-href@v1
uses: SteveSandersonMS/ghaction-rewrite-base-href@v1.1.0
with:
html_path: ${{ env.PUBLISH_DIR }}/index.html
base_href: /github-sample/
base_href: /github-services/

- name: Archive production artifacts
uses: actions/upload-artifact@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@
<ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>
</PropertyGroup>

<ItemGroup>
<Compile Remove="wwwroot\lib\**" />
<Content Remove="wwwroot\lib\**" />
<EmbeddedResource Remove="wwwroot\lib\**" />
<None Remove="wwwroot\lib\**" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.*-*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.*-*" PrivateAssets="all" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.*-* " />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.*-* " />
<PackageReference Include="TinyMCE" Version="7.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions src/AspNet.Core.Blazor.WebAssembly/libman.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"version": "1.0",
"defaultProvider": "cdnjs",
"libraries": []
}
1 change: 0 additions & 1 deletion src/AspNet.Core.Blazor.WebAssembly/wwwroot/decode.js

This file was deleted.

58 changes: 0 additions & 58 deletions src/AspNet.Core.Blazor.WebAssembly/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,6 @@
<link href="manifest.webmanifest" rel="manifest" />
<link rel="apple-touch-icon" sizes="512x512" href="icon-512.png" />
<link rel="apple-touch-icon" sizes="192x192" href="icon-192.png" />

<!-- Start Single Page Apps for GitHub Pages -->
<script type="text/javascript">
// Single Page Apps for GitHub Pages
// https://github.com/rafrex/spa-github-pages
// Copyright (c) 2016 Rafael Pedicini, licensed under the MIT License
// ----------------------------------------------------------------------
// This script checks to see if a redirect is present in the query string
// and converts it back into the correct url and adds it to the
// browser's history using window.history.replaceState(...),
// which won't cause the browser to attempt to load the new url.
// When the single page app is loaded further down in this file,
// the correct url will be waiting in the browser's history for
// the single page app to route accordingly.
(function (l) {
if (l.search) {
var q = {};
l.search.slice(1).split('&').forEach(function (v) {
var a = v.split('=');
q[a[0]] = a.slice(1).join('=').replace(/~and~/g, '&');
});
if (q.p !== undefined) {
window.history.replaceState(null, null,
l.pathname.slice(0, -1) + (q.p || '') +
(q.q ? ('?' + q.q) : '') +
l.hash
);
}
}
}(window.location))
</script>
<!-- End Single Page Apps for GitHub Pages -->

</head>

<body>
Expand All @@ -65,31 +32,6 @@
<script src="_framework/blazor.webassembly.js"></script>
<script>navigator.serviceWorker.register('service-worker.js');</script>
<script src="js/app.js" type="text/javascript"></script>

<script>
if (window.location.hostname.toLowerCase().includes('github'.toLowerCase())) {
Blazor.start({
loadBootResource: function (type, name, defaultUri, integrity) {
// For framework resources, use the precompressed .br files for faster downloads
// This is needed only because GitHub pages doesn't natively support Brotli (or even gzip for .dll files)
if (type !== 'dotnetjs' && location.hostname !== 'localhost') {
return (async function () {
const response = await fetch(defaultUri + '.br', { cache: 'no-cache' });
if (!response.ok) {
throw new Error(response.statusText);
}
const originalResponseBuffer = await response.arrayBuffer();
const originalResponseArray = new Int8Array(originalResponseBuffer);
const decompressedResponseArray = BrotliDecode(originalResponseArray);
const contentType = type === 'dotnetwasm' ? 'application/wasm' : 'application/octet-stream';
return new Response(decompressedResponseArray, { headers: { 'content-type': contentType } });
})();
}
}
});
}
</script>

</body>

</html>
Loading

0 comments on commit 47bd2f7

Please sign in to comment.