Skip to content

changed the google QR code service to qrcode.tec-it.com #81

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

roelbouwman
Copy link

No description provided.

@ashwin31 ashwin31 requested a review from Copilot May 7, 2025 17:25
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the QR code service from the deprecated Google endpoint to the new tec-it.com API.

  • Updated the QR code URL in the qrcode filter
  • Removed parameter encoding previously applied with urlencode

@@ -12,8 +12,7 @@
@register.filter
@stringfilter
def qrcode(value, alt=None):
url = conditional_escape("http://chart.apis.google.com/chart?%s" %
urlencode({'chs': '150x150', 'cht': 'qr', 'chl': value, 'choe': 'UTF-8'}))
url = conditional_escape("https://qrcode.tec-it.com/API/QRCode?data=" + value)
Copy link
Preview

Copilot AI May 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'value' parameter is now concatenated directly to the URL without URL-encoding, which may lead to errors if it contains special characters. Consider applying URL encoding to 'value' to ensure a valid URL.

Suggested change
url = conditional_escape("https://qrcode.tec-it.com/API/QRCode?data=" + value)
url = conditional_escape("https://qrcode.tec-it.com/API/QRCode?data=" + quote(value))

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant