-
Notifications
You must be signed in to change notification settings - Fork 14
[IP-385]: Allow HTML in Invoice Terms field #795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -103,11 +103,11 @@ | |
| @if ($invoice->terms) | ||
| <div style="margin-bottom: 12px;"> | ||
| <div style="font-weight: bold;">{{ trans('ip.terms') }}</div> | ||
| <div>{{ $invoice->terms }}</div> | ||
| <div>{!! $invoice->terms !!}</div> | ||
| </div> | ||
| @endif | ||
|
|
||
| @if ($invoice->footer) | ||
| <div style="color: {{ $accentColor }}; margin-top: 24px;">{{ $invoice->footer }}</div> | ||
| <div style="color: {{ $accentColor }}; margin-top: 24px;">{!! $invoice->footer !!}</div> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🛡️ Detected with Advanced Tier | 🟠 Major | 🏗️ Heavy lift 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -n -C 4 --glob '*.php' 'sanitizeRichText|sanitizeHtml|\{!!\s*\$invoice->footer' .
rg -n -C 4 --glob '*.php' 'backfill|Schema::table|table\(.*invoices|footer' .Repository: InvoicePlane/InvoicePlane-v2 Length of output: 41993 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- invoice render/preview callers ---'
rg -n -C 5 --glob '*.php' 'renderHtml\(|pdf/invoice|invoice\.blade|formatted_footer|footer' Modules/Invoices Modules/Core routes app resources 2>/dev/null | head -n 260
printf '%s\n' '--- observer registration and model hooks ---'
rg -n -C 5 --glob '*.php' 'InvoiceObserver|observe\(|booted\(|saving\(' Modules/Invoices app bootstrap 2>/dev/null | head -n 220
printf '%s\n' '--- relevant default invoice template ---'
sed -n '150,180p' Modules/Core/resources/Templates/Views/templates/invoices/default.blade.phpRepository: InvoicePlane/InvoicePlane-v2 Length of output: 29455 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- InvoiceService renderHtml and PDF methods ---'
rg -n -C 12 --glob '*.php' 'function renderHtml|function generatePdf|formatted_footer|view\(.*invoice|pdf' Modules/Invoices/Services Modules/Invoices/Models Modules/Invoices/Http routes 2>/dev/null | head -n 320
printf '%s\n' '--- invoice route/controller response callers ---'
rg -n -C 8 --glob '*.php' 'generatePdf\(|renderHtml\(|InvoiceService::class|invoice.*pdf|pdf.*invoice' Modules/Invoices routes app 2>/dev/null | head -n 320Repository: InvoicePlane/InvoicePlane-v2 Length of output: 6519 XSS Reachability: External Backfill legacy invoice footers before raw rendering.
🤖 Prompt for AI Agents |
||
| @endif | ||
| </div> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: InvoicePlane/InvoicePlane-v2
Length of output: 828
🏁 Script executed:
Repository: InvoicePlane/InvoicePlane-v2
Length of output: 28543
🏁 Script executed:
Repository: InvoicePlane/InvoicePlane-v2
Length of output: 18167
🌐 Web query:
Laravel framework v13.25.0 Illuminate\Support\Str sanitizeHtml method source💡 Result:
<source_evidence>
Citations:
🏁 Script executed:
Repository: InvoicePlane/InvoicePlane-v2
Length of output: 166
🌐 Web query:
site:github.com/laravel/framework/blob/ed36fe882bd4eed4e6ff75343cbad8dbda03fdba/src/Illuminate/Support/Str.php sanitizeHtml💡 Result:
<source_evidence>
Citations:
Use a supported HTML sanitizer.
Illuminate\Support\Strdoes not providesanitizeHtml. The observer can reach this call for each non-nulltermsorfootervalue, so saving such an invoice can throw an undefined-method exception.Suggested fix
📝 Committable suggestion
🤖 Prompt for AI Agents