Python code:
from flask import Flask, render_template
app = Flask(__name__)
@app.route("/")
def test():
id = "2138291837273817238" # Can Be some random number
return render_template("first.html", id=id)
if __name__ == "__main__":
app.run("0.0.0.0", 8000)
Html:
<!DOCTYPE html>
<html>
<title>Testing</title>
<body style="background-color:#222736;">
<h1 style="color:#f6f6f6">Testing</h1>
</body>
<script>
console.log({{ id }})
</script>
</html>
Javascript console:
2138291837273817300
As you can see, 2138291837273817238
and 2138291837273817300
are not the same number. The parameter is always rounded up at the 17th number.
Is this just a JavaScript error?
Am I doing something wrong?
And can someone reproduce this?