43 questions
0
votes
1
answer
117
views
Unable to use DefaultAzureCredential in inline C# script of Azure Logic App (Standard)
I’m running an inline C# script in an Azure Logic Apps workflows to get the blob details using DefaultAzureCredential(). I have given 'Storage Blob Data Contributor' to Azure Logic App in Storage ...
1
vote
1
answer
396
views
inline event handler nested within a javascript - Refused to execute inline event handler because it violates the following Content Security Policy
Preface: Hashes belonging to all known or identifiable Javascripts have been included in the CSP Header.
When I click on the custom Facebook share button, I get the following error:
Refused to ...
5
votes
0
answers
3k
views
How can I fix jQuery 3.7.0 inline script violation with CSP
jQuery 3.7.0. has a line of code that violates CSP policies for inline scripting that has been persisting since version 3.1.1, seeing as it is clearly not getting fixed anytime soon I was wondering if ...
1
vote
2
answers
3k
views
Yaml parameter to inline script
Hello I think the problem I am facing might be a beginner doubt, but here it is:
I have a stage yaml which is called by my main yaml. Stage yaml has a parameter which I want to use in inline script.
...
0
votes
1
answer
942
views
Expose Functions Using Webpack & Then Call Them From an Inline Script
I'm working on getting a bunch of legacy inline scripts cleaned up.
My question is: How do I call a function from an inline script that is compiled in WebPack.
After trying a bunch of different ...
0
votes
2
answers
2k
views
Tailwind CSS IntelliSense in Visual Studio Code does not provide suggestions in an inline script?
I am trying to get the TailwindCSS IntelliSense working inside an inline script. I am using handlebars in a simple One-Pager, however the autocompletion doesn't work in side the script tag.
<div id=...
1
vote
0
answers
991
views
Content Security Policy (CSP) with unsafe-hashes is not working on mozilla firefox
I used the unsafe-hashes for our Content-Security-Policy to override the errors for our html inline attached events, so in Chrome it works fine and scripts like this are working properly:
<a id=&...
0
votes
0
answers
966
views
How to inject inline script when Content Security Policy is preventing it?
I'm using Chrome Extension ReactJS which I'd like to insert this in popup.html:
<script src="https://unpkg.com/[email protected]/build/index.js"></script>
<script>
...
0
votes
1
answer
273
views
How to translate inline javascript?
So I'm working on a django project and we're having English translated to Czech (not important). I can do fine with regular tags being translated with {% trans 'sample text' %}
However, I have a ...
-2
votes
1
answer
11k
views
how to disable Content Security Policy and stay secure? [closed]
i want to disable the CSP - app.use(helmet.contentSecurityPolicy()) because it blocks any inline-scripts. the hash and nonce solutions (https://content-security-policy.com/examples/allow-inline-script/...
5
votes
1
answer
3k
views
Inline-script hash or nonce not accepted by CSP
I am developing a Flask App and it uses Flask-Talisman to incorporate a CSP. I wanted to create an inline script in one of my templates and instead of adding 'unsafe-inline' to the 'script-src' array ...
0
votes
0
answers
656
views
Expose JavaScript Module's Function to Entire HTML Document
Consider this basic function in /js/foo.mjs:
export function foo( ) {
console.log('Hello, Modularity!');
};
How to import foo function inside an HTML document, so it can be used inline?
<html&...
0
votes
1
answer
1k
views
Insert inline script to the index.html with env variable
I have index.html where I want to load hotjar tracking code (only inline script), but it depends on the env variable.
I tried to use webpack DefinePlugin
new webpack.DefinePlugin({
'process....
1
vote
4
answers
235
views
A different angle on How to write html code inside php?
We write PHP code inside the HTML code via <?php ... ?> tags. So normally it would not make sense to write HTML code inside PHP code that is already inside HTML code, if you can just exit the ...
1
vote
1
answer
466
views
Add inline Javascripts on Wordpress
I want to add inline Javascript on footer of my wordpress site. I know we can add inline Javascript using wp_add_inline_script. From my understanding from Codex tutorial, we have to register and ...
1
vote
2
answers
5k
views
add an item to arraylist in powershell workflow foreach -parallel
How can we add an item to an arraylist while using foreach -parallel loop in powershell workflows?
workflow foreachpsptest {
param([string[]]$list)
$newList = [System.Collections.ArrayList]@()
...
4
votes
1
answer
16k
views
Mitmproxy tampering with GET and POST request/ response in one script
A POST request sent to a certain URL (http://test.com) looks like this:
{
"messageType": "OK",
"city": {
"Name": "Paris",
&...
1
vote
3
answers
1k
views
jquery - function not defined - calling this function from inline script
I have the code as shown below. Have removed unwanted code from this, just wrote what was needed. When I call my toggleFunc from inline script in body, it shown in console that this function is not ...
1
vote
10
answers
7k
views
How to print a line of HTML markup containing inline javascript and nested quoting?
How should I quote this:
<tr onclick="$.colorbox({href:'information1.html'});">
When put in an echo " "; ?
I have tried this:
echo "<tr onclick='$.colorbox({href:'...
1
vote
3
answers
413
views
Ajax jQuery Best practices: avoid inline script?? then how do I pass variables
I just read in a best practices article for jquery and ajax that I should avoid defining behavior for elements on the page with inline script. That does make sense since it makes the code very ...
1
vote
1
answer
505
views
jQuery.load() with AJAX Kontactr form
After seeing many questions about how jQuery.load() handles tags in the content to be loaded, I see that jQuery strips out inline tags. But, I'd like to use Kontactr for the contact page in my site, ...
2
votes
2
answers
3k
views
Inline scripting in ASP.NET
I want to learn advanced and basic things about ASP.NET inline scripting like
<img src="<%= Page.ResolveUrl("~")%>Images/Logo.gif"/>
or
<asp:Label ID="lblDesc" runat="server" Text='&...