Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8180841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:19:41+00:00 2026-06-07T00:19:41+00:00

var ref1 = new Firebase(http://gamma.firebase.com/myuser/123,456); ref1.set(123,456); var on1 = ref1.on(value, function(snapshot) { console.log(snapshot.val()); });

  • 0
var ref1 = new Firebase("http://gamma.firebase.com/myuser/123,456");
ref1.set("123,456");
var on1 = ref1.on("value", function(snapshot) {
    console.log(snapshot.val());
});
// console logs 123,456

So naming with a comma works fine. But let’s say you want to pass around the url to the ref.

var url1 = ref1.toString();
console.log(url1);
// console logs http://gamma.firebase.com/myuser/123%2C456

The toString() function returns a version of the url with commas replaced by “%2C”. This would be fine if the URL were still useable.

var ref2 = new Firebase(url1);
var on2 = ref2.on("value", function(snapshot) {
    console.log(snapshot.val());
});
// console logs null

Is this a bug, or is there a good reason why the user should have to do something like

var url1 = ref1.toString().replace(/%2C/g,",");

in order to get a useable Firebase URL?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T00:19:42+00:00Added an answer on June 7, 2026 at 12:19 am

    Commas are allowed in Firebase keys. There is a list of restricted characters on our website though for future reference in our docs.

    The issue here is that the toString() method is URL-encoding the urls. Our intention here is that this will make it easier to paste that URL in a browser and view it with our real-time debugger. I can see how this creates a problem though if you call toString and then try to create a new Firebase reference with that string.

    We didn’t consider it a normal use case for someone to do that. Could you elaborate on why you are building new Firebase references using the toString method of another reference? We have “child()” and “parent()” functions to help you traverse your data.

    We’re going to discuss internally if we want to change the way URLs are encoded in toString and may fix this in future versions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

var chart; var d = new Array(); function click() { d = document.getElementById('graph:hi').value; alert(d);
var conversations = new Array(); jQuery('.CChatWindow').each(function(){ if (jQuery(this).is(:visible) && jQuery(this).attr(data-conversationid) != 0) { alert(jQuery(this).attr(data-conversationid));
var bk = new Bookmark(); bk.link=blink; bk.title=btitle; bk.tags=[11,22]; for(var i=0;i<20;i++) { bks.push(bk);} chrome.storage.sync.set({bookmarks:bks}); I'm
var y = new w(); var x = y.z; y.z= function() { doOneThing(); x();
$('.add_instruction_btn').click(function(e){ e.preventDefault(); var ins_content=$('#add_instructions').val(); var id=$('.useri').val(); if(ins_content!=) { //write new instructions to database var
var geocoder, map, point, fmtAdd, marker; function mapLoad() { geocoder = new google.maps.Geocoder(); var
var rinlinejQuery = / jQuery\d+=(?:\d+|null)/g, html: function( value ) { if ( value ===
var idParam = new SQLiteParameter(@idParam, SqlDbType.Text) { Value = insertData.ID }; var userIdParam =
var Foo = Foo || {}; Foo.Controller = (function ($) { var $page =
var JavascriptHelper = Backbone.Model.extend(JavascriptHelper, {}, // never initialized as an instance { myFn: function()

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.