jeromeetienne / jquery-qrcode

qrcode generation standalone (doesn't depend on external services)
http://blog.jetienne.com/blog/2011/04/07/jquery-qrcode/
MIT License
4.84k stars 2.5k forks source link

Overflow in "text" variable? #50

Open catselbow opened 11 years ago

catselbow commented 11 years ago

In the example below, the generated QR code image shrinks in width and height by approximately half whenever the length of the "text" exceeds 32 characters. (For example, if you add "/people" to the end of the URL in the example below.) My guess is that this exceeds the length of some array inside jquery.qrcode.js. Here's the example:

<!DOCTYPE html>
<head>
        <script src="jquery-1.10.2.js"></script>
        <script src="jquery.qrcode.js"></script>
</head>
<body>
<div id="qr1" style="width: 100px; height: 100px; border: 1px solid black;"></div>
<script language="javascript">
$("#qr1").qrcode({
        render: 'div',
        size: 50,
        color: '#000000',
        text: 'http://www.phys.virginia.edu'
});
</script>
</body>
</html>