Skip to content
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

Can't pass "&" in dmtx or qr #20

Open
aculine opened this issue Apr 27, 2021 · 1 comment
Open

Can't pass "&" in dmtx or qr #20

aculine opened this issue Apr 27, 2021 · 1 comment

Comments

@aculine
Copy link

aculine commented Apr 27, 2021

Hi, I cannot be able to pass url with & in barcode dmtx or qr.
If I use %26 (& in urlencode), barcode seams do not draw correcly.
I need to pass a url like "https://www.domain.ext/wp-admin/post.php?action=edit&post=123"

Any idea?

Thank you, Luca

@merry-goblin
Copy link

This library allows to build and display a barcode by calling it directly from your browser. If it seems like a fancy and easy way to produce a barcode. Actually it is a very bad idea. It allows other people than yourself to call build their own barcodes with your code. This is absurd.

You should instead build your barcode from your own script like below. It will also solve your problem.

<?php

require_once('barcode.php');

$generator = new barcode_generator();
$data = 'https://www.domain.ext/wp-admin/post.php?action=edit&post=123';
$format = 'png';
$type = 'qr';
$options = [
	'w' => 600,
	'h' => 600,
];
$generator->output_image($format , $type, $data, $options);


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

No branches or pull requests

2 participants