Senator Scott Brown, who has earned kind words from Boston Mayor Thomas M. Menino despite their differing political parties, today tread carefully when asked during a Boston.com chat about the city leader’s spat with Chick-fil-A over its opposition to gay marriage.

“I disagree with what the CEO from Chick-fil-A said. I was glad he spoke further and said that his company does not discriminate,” wrote Brown, working on a laptop in his South Boston headquarters.

Noting that Massachusetts has strong anti-discrimination laws, Brown added: “If they move forward with the location proposal, I trust the mayor and other officials will ensure that those laws are honored.”

Advertisement - Continue Reading Below

Dan Cathy, president of the Atlanta-based company, told the Baptist Press earlier this month that Chick-fil-A is “guilty as charged” for being a supporter of organizations rallying against same-sex marriage. Cathy’s father founded the chain and instilled biblically-based principles its operations, including the practice of closing on Sundays in respect to the Christian day of worship.

Dan Cathy’s statement, though, prompted a reaction from some gay rights groups. Menino got involved a week ago when he wrote to Cathy and told the company—which is planning a restaurant across the street from City Hall—that it wasn’t welcome in Boston.

“There is no place for discrimination on Boston’s Freedom Trail and no place for your company alongside it,” wrote Menino.

The mayor backed off this week, conceding he can’t legally prevent the company from opening in Boston but is allowed to use the bully pulpit of his office to rally opposition to its beliefs.

In his answer, Brown did not address whether he felt the chain should open a restaurant in Boston.

Menino has pointedly withheld his endorsement of fellow Democrat Elizabeth Warren as she challenges Brown, a Republican, for reelection. Brown has cultivated support from the mayor, and played up the bipartisan theme at several points during the 45-minute chat.

Warren participated in a similar chat on June 22.

Asked by reader “Lindsay” why he opposes a national assault weapons ban even in the aftermath of the Aurora, Colo., mass shooting, Brown noted that he voted for such a ban for Massachusetts while in the state Senate.

“I believe that states should make these decisions like we have,” Brown said. “Incidentally, I was proud to get the endorsement of gun control advocate, independent NYC Mayor Michael Bloomberg, because of my stance on concealed carry.”

Bloomberg announced his endorsement of Brown on Thursday, citing the senator’s opposition to the National Rifle Association’s “Right-To-Carry Reciprocity Act.” It would allow gun owners to carry concealed weapons across state lines.

Meanwhile, in response to a question about the Dodd-Frank financial regulatory act, Brown said he was “proud to be the deciding vote” during its 2010 passage.

But records show that after he voted for the law, the senator worked to shield banks and other financial institutions from some of its tough provisions.

As the Globe previously reported, e-mails between Brown’s legislative director and US Treasury Department officials show that Brown advocated for a loose interpretation of the law so that banks could more easily engage in high-risk investments.

During the chat, Brown wrote: “My work on the reform bill was designed to protect Mass. jobs and ensure that those institutions that did nothing wrong were not unfairly impacted by the provisions of the bill. I was proud to work and vote with other members of the delegation to protect Mass. jobs.”

A questioned named “Todd” also asked Brown how his 32-year tenure in the National Guard informed his service on the Senate Armed Services Committee.

“As a result of serving in Afghanistan, I was able to learn that when we contract with the enemy we cannot terminate that contract without a lot of legal problems,” Brown wrote. “[New Hampshire Senator Kelly] Ayotte and I filed an amendment to make sure that if we learn that we are contracting with the enemy, we can terminate said contract and recoup the funds.”

Brown and Ayotte, however, filed their amendment six months before the senator spent time last summer doing his annual Guard training in Afghanistan.

A spokeswoman said Brown wasn’t suggesting that he filed the amendment based on the lessons he learned overseas, but that his experience in Afghanistan deepened his understanding of the need for his amendment.

Brown and Warren are engaged in one of the most hotly contested and closely watched US Senate races in the country.

Brown is seeking his first full, six-year Senate term after stunning the Democratic establishment in January 2010 by winning the seat held for nearly a half-century by the late Democrat Edward M. Kennedy.

Warren, a Harvard Law School professor, is making her first foray into elective politics, after working in Washington heading the Congressional Oversight Panel monitoring the TARP program, and setting up the Consumer Financial Protection Bureau.